Laravel Validation Rules Examples

Description:
The field under validation must be yes, on, 1, or true. This is useful for validating "Terms of Service" acceptance.
Accepted Value:
yes, on, 1, or true
Valid Input Values
yes
on
1
true
Invalid Input Values
Yes
On
True
YES
ON
2
TRUE
Rules Specification:
request()->validate([
    "terms" => 'accepted'
]);
HTML Specification:
<input type="text" name="accept" class="form-control" placeholder="Enter the Accept">
Demo

Valid!

Invalid!