skip to Main Content

Laravel form validation max chars using 2 fields

i have a simple registeration form i use this validation for creating u new user $validator = Validator::make($request->all(), [ 'first_name' => ['required'], 'last_name' => ['required'], 'phone' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required',…

VIEW QUESTION

Get array validation key in laravel

Im using laravel 8.83.27 public function messages() { return [ 'price_per_image.array' => 'Price must be an array', 'price_per_image.required' => 'Price per image field is required', 'price_per_image.*.required' => 'Price per image '.preg_replace('/^[a-zA-Z_]*./', '', ':key').' field required', 'price_per_image.*.numeric' => 'You have invalid…

VIEW QUESTION

Javascript – Comma separated mobile number Regex validation

I'm trying validation for mobile number(With country code) which is not working. Posting the validation criteria below: Valid Numbers: +18790912345 (Valid) +18790112345,+18790123409 (Valid) +1-2569890912345 (Valid) +1-2569890912345,+939890912098 (Valid) -19890123909 (Valid) Invalid Numbers: +1909890 (Invalid) 9800112345 (Invalid - without country code) +1…

VIEW QUESTION
Back To Top
Search