96818/how-to-validate-exact-words-in-laravel
Does the validation class in Laravel validate exact words?
eg
$rules = [ "field" => "hello" ]
Where the value of the field must be "hello".
Hello,
Try this code:
// option one: 'in' takes a comma-separated list of acceptable values $rules = [ 'field' => 'in:hello', ]; // option two: write a matching regular expression $rules = [ 'field' => 'regex:^hello$', ];
Hello @kartik, The issue is route parameters aren't ...READ MORE
Hello @kartik, try using nullable as a rule 'password' ...READ MORE
Hello, First you have to go to routes ...READ MORE
Hello, You can first refer how to Create controller through ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hey @kartik, In Programming validations are a handy ...READ MORE
Hello @kartik, you can call validate() method directly ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.