This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
The50
How could I validate if the checkbox is ticked?
public $rules = [ 'name' => 'required', 'email' => 'required|email', 'phone' => 'required', 'terms' => 'required', ]; 'terms' is the name of the checkbox. Now I get the alert about required field even if it is checked.
HTML: "input type="checkbox" name="terms" value="1" id="terms""
Simple HTML5 attribute required is also not working.
Last updated
1-1 of 1