Created
July 29, 2022 03:39
-
-
Save Octagon-simon/92899f13d61615e96121e4cc0af4f3e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| //define validation rules | |
| $valRules = array( | |
| "username" => array( | |
| ["R", "Your username is required"], | |
| ["UNAME"] | |
| ), | |
| "email" => array( | |
| ["R", "Your Email is required"], | |
| ["EMAIL", "Your Email is invalid"] | |
| ), | |
| "age" => array( | |
| ["R", "Your Age is required"], | |
| ["DIGITS", "Your Age must be in digits"], | |
| ["LENGTH", "2", "Your age must be 2 digits"] | |
| ), | |
| "password" => array( | |
| ["R", "Your Password is required"], | |
| ["PASS"] | |
| ) | |
| ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment