Okay, I'm trying to validate the username and I have a match_pattern rule on it to only allow letters and numbers. But I"m confused on how to set the error message if they have spaces or underscores or whatever.
I know it would be like $val->set_message('match_pattern', 'pattern not matched').. but how do I specifically say 'Username must be letters and numbers only'?? Because what if there is another field where I'm only allowing letters and underscores? I need to set_message for a SPECIFIC field.