Laravel 5 form validation field should be empty

Would you like to have a validation for the fact that a field should be completely empty in Laravel 4 or 5?

In that case add this form validation rule:

$this->validate($request, [
   'field_that_should_be_empty' => 'regex:/^$/i',
);

Leave a Reply

Your email address will not be published.