'required|regex:/^[a-zA-Z\s]+$/', 'authorized_representative_name' => 'required|regex:/^[a-zA-Z\s]+$/', 'email2' => 'required|unique:users,email|regex:/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/', 'password2' =>'required|min:8|regex:/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\x])(?=.*[!$#%@]).*$/', 'password_confirmation' => 'same:password2', 'contact_number2' => 'required|unique:users,contact_number|min:10|max:12|regex:/^(\+\d{1,3}[- ]?)?\d{10,12}$/', 'g-recaptcha-response' => 'sometimes|required', ]; } public function messages() { return [ 'name2.required' => 'The name field is required.', 'email2.required' => 'The email field is required.', 'password2.required' => 'The password field is required.', 'contact_number2.required' => 'The contact number field is required.', 'email2.unique' => 'The email field is unique.', 'contact_number2.unique' => 'The contact number field is unique.', ]; // return [ // 'contact_number.min' => 'Contact Number should be minimum 10 numbers', // 'contact_number.max' => 'Contact Number should be maximum 12 numbers', // 'contact_number.regex' => "Mobile number should be number not alphabets", // 'password.regex' => 'Password does not follow regex', // 'password.min' => 'Password should be minimum 8 characters', // 'password.confirmed' => 'Password Confirmation Does Not Match Password', // 'unique' => 'The :attribute field should be unique.', // 'required' => 'The :attribute field is required.', // 'name.regex' => 'The :attribute field contain only alphabets', // ]; } }