Quantcast
Channel: Laravel Form Validations - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Laravel Form Validations

$
0
0

I am validating number field below code is working fine. It is checking the characters should not be more then 2 or less, which is fine for me.

/** * Get the validation rules that apply to the request. * * @return array */public function rules(){    return ['id'    => 'required|min:2|max:2','title' => 'required'    ];}

But when I add more validation rule like (numeric), min and max validaiton rules get changed, now it is being checked by the numeric number should not be greater than 2... WHY? IS IT BUG?

/** * Get the validation rules that apply to the request. * * @return array */public function rules(){    return ['id'    => 'required|min:2|max:2|numeric','title' => 'required'    ];}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images