-
-
Save cuongdcdev/ccbbff0ec4b7414559de028683af7d11 to your computer and use it in GitHub Desktop.
Input verification on front and back ends
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function form() | |
{ | |
$form = new Form(new ModelName); | |
$form->text('title')->rules('required')->required()->help('This field must be required'); | |
$form->text('number')->rules('required|regex:/\d{3}/')->pattern('\d{3}')->help('This field must be three digits'); | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment