Skip to content

Instantly share code, notes, and snippets.

@Octagon-simon
Created July 29, 2022 03:39
Show Gist options
  • Select an option

  • Save Octagon-simon/92899f13d61615e96121e4cc0af4f3e9 to your computer and use it in GitHub Desktop.

Select an option

Save Octagon-simon/92899f13d61615e96121e4cc0af4f3e9 to your computer and use it in GitHub Desktop.
<?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