Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
3 answers
187 views

I am encountering 500 error in when I try to initialize Spatie Laravel Data class with null field instead of 422 Here is the class: namespace App\Data; use Spatie\LaravelData\Attributes\Validation\...
John's user avatar
  • 393
0 votes
0 answers
37 views

How can I on laravel 10 site to check that field user_name is only text and in 1 language(ukrainian) ? FIX_ATTEMPT : I try to make it simple : class CheckUkrainianAlphabet { public function check(...
Petro Gromovo's user avatar
2 votes
1 answer
205 views

I want to log in using my phone number or email in Laravel 11 with Breeze. ┌──────────────────────────────────────────────┐ │ ...
zockchin's user avatar
0 votes
1 answer
92 views

I have to build a user registration form for a web application in Laravel. The form should collect the following data from users: Name: The user's full name. Email: The user's email address. Password: ...
Eric Walter's user avatar
1 vote
1 answer
57 views

In laravel 11 / livewire 3.5 app Icreated a custom rule with command : php artisan make:rule LocationIsValidRule and having a file with declaration : <?php namespace App\Rules; use App\Library\...
mstdmstd's user avatar
  • 3,309
0 votes
1 answer
95 views

On Laravel / Livewire site item model has unique "title" field and I added unique in validate attribute class ItemEditor extends Component { #[Validate('required|string|min:3|max:255|...
Petro Gromovo's user avatar
0 votes
1 answer
111 views

I created a simple custom validation rule via php artisan make:rule, and now I want to write unit tests for it. How do I test a validation rule to pass or fail? Since $rule->validate() does not ...
fudo's user avatar
  • 3,034
0 votes
2 answers
105 views

I tried some validation rule like: Boolean and Required file with nested array field, but always failing for example, I tried creating form request like this: <?php namespace App\Http\Requests\...
hirohito's user avatar
0 votes
1 answer
120 views

I'm studying Laravel 11 and I have my first problem using PHPStorm (I don't know if it's my test or not). I have this controller: <?php namespace App\Http\Controllers; use App\Http\Controllers\...
Luis's user avatar
  • 2,143
0 votes
2 answers
90 views

I have validation in Laravel 10 that contains validation for company_description. I want it to be required when two other fields have specified values. I got this code: 'company_description' => [ ...
wojtek1904's user avatar
1 vote
2 answers
117 views

We have this validation code: $data = [ [1, 2, 3], [3, 4, 5] ]; $validator = \Validator::make([ "bla" => $data, ], [ 'bla' => 'required|array', 'bla.*' ...
Hey's user avatar
  • 195
-1 votes
3 answers
80 views

On Laravel 11 site I need to check decimal values from 0 till 100(with 2 decimals possible) and I do it with rules : ['required', 'numeric', 'between:0,100'], OR required|numeric|min:0.01|max:100 ...
Petro Gromovo's user avatar
1 vote
0 answers
110 views

Why am I getting this error: The remarks field is required.? Note that the remarks has a value. When I dump the validated request, the remarks exists. The introduction field is same as the remarks but ...
user19991216's user avatar
0 votes
3 answers
312 views

In my Laravel application, I would like to check wether the value of the field uuid is present in table courses or in table contingents using validation rules. The UUID must be present in one of the ...
Niklas's user avatar
  • 1,824
0 votes
1 answer
643 views

I have a simple Angular 16 login/register form; when a user registers in my app, register data is sent via http request to my laravel backend, where i handle user registration. before i create a new ...
Ricardo Carneiro's user avatar
1 vote
1 answer
52 views

I'm relatively new to Laravel and I've run into a problem. When users edit their information in my system, I want to bypass the email validation. Specifically, they shouldn't receive an error stating ...
Eric's user avatar
  • 13
1 vote
1 answer
257 views

I have a model named ClientDiscountRate, which naturally corresponds to a table. I am developing a method to allow the creation of a new ClientDiscountRate. However, I am facing a problem: the ...
TKoL's user avatar
  • 13.9k
0 votes
1 answer
538 views

I'm encountering an issue in my Laravel application where the validation process stops working due to a "invalid input syntax for type uuid" error from Postgres. This occurs when I try to ...
Sahib Huseynov's user avatar
0 votes
1 answer
160 views

What I am trying to do is to get the length of an array inside closure Laravel validation. Here is what I have tried: 'attachment' => 'max:10', 'attachment.*' => 'max:10240|mimes:...
Bu Saeed's user avatar
  • 1,347
0 votes
1 answer
193 views

When updating a specific user, I want to run unique validation for the 'username' and 'studentNumber' fields, but only for other users and not for the same user being updated because its already owned ...
aasem shoshari's user avatar
0 votes
1 answer
64 views

I have following segment of the validation: 'places' => [ new CompanyHasPlacesRule, ], and the validation class: public function validate(string $attribute, mixed $value, Closure $fail): void ...
Sasha's user avatar
  • 8,725
0 votes
0 answers
43 views

i have 3 parameters (br_code,slc_code,slt_code) im done with validations for br_code and slc_code to validate slt_code, i have to check if slc_code and slt_code exist on table(sltype) , how do i do it?...
kazuha inazuma's user avatar
1 vote
1 answer
141 views

I have the following code: use Illuminate\Support\Facades\Validator; $rules = array( 'attachment' => 'max:1000|file|mimes:jpeg,png,jpg,gif,svg,pdf', ); $messages = array( 'attachment....
José Victor's user avatar
0 votes
2 answers
93 views

The default validation error message in Laravel is not functioning as expected. When using validation, the response displays a generic message like (validation.required) instead of the intended ...
Indra Basnet's user avatar
1 vote
2 answers
120 views

I am a beginnerwith the Laravel framework. I am struggling to declare validation of request data. I have some checkboxes in the form, and at least one of the checkboxes must be selected to submit to ...
Daehue  Kim's user avatar
0 votes
0 answers
270 views

Datetime input on Form this my input datetime in form, the format is 30/12/2023 11.52.18 i want to validate that format with laravel validation rule data_format i was try on laravel validation rule -&...
Guswah 88's user avatar
0 votes
1 answer
513 views

I have this code for an API, testing with Postman: public function register(Request $request) { $validated = $request->validate([ 'name' => 'required|string', 'email' => '...
alex's user avatar
  • 105
0 votes
1 answer
86 views

I'm trying to sync with additional data, like this: $game->contestants()->sync([3 => ['budget' => 30.5], 7 => ['budget' => 25]]) Which works as expected, but I am trying to validate ...
aznmik's user avatar
  • 45
0 votes
3 answers
2k views

I need to add validation for a dynamic array whose elements can be strings or subsequent arrays containing strings, but I can't find a way to save this rule. My current validation: $data = $...
clover's user avatar
  • 45
0 votes
3 answers
529 views

I'm using laravel validation for a date field like this: Validator::make($shipment, [ 'collection_date' => 'required|date', ... and I'm sending json with this field: "...
TKoL's user avatar
  • 13.9k
1 vote
2 answers
2k views

In my controller I validate fields of my json request. To obey single responsibility, I want to create a custom Validator class and put following code to my validator class. When I type: php artisan ...
tolga's user avatar
  • 2,888
-1 votes
1 answer
77 views

I was trying to implement socialite login register with Laravel. But i failed to validate data with laravel default validation Rule. Like in user table , email should be unique. How can i implement ...
Hola's user avatar
  • 2,231
0 votes
0 answers
111 views

I'm currently facing this issue where I want to use the max key when I upload a file. But then it returns a different message. The max key returns the uploaded message instead of the max message. I ...
Blues Clues's user avatar
  • 1,908
0 votes
1 answer
154 views

Our app has multiple identical forms on a page. Before submitting the data, I want to validate the inputs of all the forms with a single request from Vue. I came up with the following frontend portion ...
Riza Khan's user avatar
  • 3,238
-1 votes
2 answers
526 views

Previously it worked before I edit it for firebase, but for now I want to see local auth first after I edit it for firebase. it can register but not login, it resulted in The email field is required. ...
Kholid Syaifullah's user avatar
0 votes
1 answer
95 views

I have many endpoints in Laravel that utilise FormRequests for validation. Is there a way to trigger those endpoints' validation only? The use case for this is that I want to trigger multiple ...
Giedrius's user avatar
  • 1,390
-1 votes
1 answer
382 views

I am working on the Laravel Validation code. In my code, I used the radio button for three options like approve, reject, and return. In the Remarks textbox, validation depends on the Radio button ...
Mukhila Asokan's user avatar
2 votes
0 answers
103 views

I would like to make a validation for the input string using Laravel 6 with the input condition as below. userNo = "5031234567" => Len = 10 digits and must start with 503. I tried to ...
Yang's user avatar
  • 23
0 votes
0 answers
471 views

I am trying to build a dynamic form for a warehouse management portal using Laravel and Livewire. For that form I need validation for all the input values. I have followed the exact format given in ...
mihir's user avatar
  • 11
0 votes
3 answers
151 views

I'm trying to build an application in Laravel where I need to take input user's job experience with their start date and end date. There is a use case where the user can be currently working in any ...
Rubal Gulati's user avatar
0 votes
0 answers
132 views

I have checked out several post with similar question ( for an example ) But did not quite found the answer I am looking for. I am working on a Laravel multi-step form. and in one of the step the code ...
Bashabi's user avatar
  • 706
1 vote
1 answer
1k views

I'm trying to make a POST Request to Laravel from Reactjs to insert into the database a product which may have some categories which is an array, also some images. But it seems that when I send the ...
Galbert's user avatar
  • 386
0 votes
1 answer
522 views

I access a page of Route::post('search'). From this page, I perform a form submission using a POST method. If the validation fails, I get error The GET method is not supported for this route. ...
Mr. Kenneth's user avatar
  • 1,047
0 votes
1 answer
87 views

I am trying to achieve validation on Pickings Array where the location is unique, { "id": 10, "type": "picking", "pickings": [ { "id": ...
Sharif's user avatar
  • 106
0 votes
1 answer
935 views

I am using laravel 8. I need to validate 3 fields to make 1 phone number. The flow is to combine the 3 fields and then save to database. Validation is triggered when one of the fields is not the ...
Mr. Kenneth's user avatar
  • 1,047
0 votes
1 answer
162 views

I have form request AccountGrantRequest <?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class AccountGrantRequest extends FormRequest { public function authorize():...
JKSDS's user avatar
  • 111
0 votes
2 answers
556 views

I am doing FormRequest validation. I am using the array rule to ensure that only specified keys are allowed in the validated array. For example: $rules = [ 'example' => ['array:something,another']...
Ari Cooper-Davis's user avatar
0 votes
1 answer
98 views

I have this StoreMessageRequest public function rules(): array { return [ 'message' => [ 'required', 'string', 'max:60', ...
fjduqrllhdnolvgrcc's user avatar
1 vote
1 answer
2k views

I want to create a custom rule in Laravel 10. I used php artisan rule:make ValidPackageItem, and this class is generated <?php namespace App\Rules; use Closure; use Illuminate\Contracts\...
Ahmed Wagih Refaey's user avatar
1 vote
0 answers
54 views

This is the error I am getting at the moment: Illuminate\Support\ViewErrorBag {#1725 ▼ // resources/views/components/forms/form.blade.php #bags: array:1 [▶ "default" => Illuminate\...
Sasha's user avatar
  • 8,725

1
2 3 4 5
18