Validate alpha characters using php snippets. This function allows only alphabets either in small letters or in capital letters. Php regex that allows only alpha characters.
function validateAlpha($string) {
return (bool)preg_match("/^([a-zA-Z])+$/i", $string);
}
function validateAlpha($string) {
return (bool)preg_match("/^([a-zA-Z])+$/i", $string);
}
No comments:
Post a Comment