Level 2
Well the not_regex validation rule does not exist in Laravel 5.2. You could use the regex validation rule and don't allow numbers:
/^([^0-9]*)$/
hi
How to use not_regex for validation i'm using laravel 5.2
$this->validate($request, [
'title' => 'required|not_regex:([0-9])',
]
it give this error
BadMethodCallException in Validator.php line 3321:
Method [validateNotRegex] does not exist.
Maybe this will work?
'title' => [
'required',
'regex:/^([^0-9]*)$/',
'regex:second expression',
],
But it's probably better to combine the two regex patterns.
Please or to participate in this conversation.