I want to check if the variable $username is alphanumeric and less than 15 characters. Does CodeIgniter have this functionality built in? I don’t want to rewrite these functions if they already exist. I know there’s form validation, but that’s not what I want.
I want to check if the variable $username is alphanumeric and less than 15
Share
Following @Sparky’s comment, all the validation functions look like they are public functions inside of
Form_validation.phpyou can load form vlaidation and use the validation functions directly
so you could run it through
max_lengththenalpha_numeric, as they are all public just look at source and call them with the correct params