I'm guessing that srule is new to oop. And thats ok. Your syntax is correct, its just the concept is a little... off. Think more abstractly at the validation process - I think it was aedrin that mentioned you should use regular expressions, which I would agree with, map some regexp to class constants (no enum unfortunately
). Consider something that takes any input from any field, and is told by you how to validate it, so it can be called more evenly, with a prototype of validate($data, $type): Validator::validate($username, Validator::USERNAME), Validator::validate($gender, Validator::RADIO) kind of an idea.
Control error reporting by throwing exceptions from your classes and capturing them in your main.
Good start though, think a little more abstractly (consider using static methods). I'm interested to see what this will come out with.