Hello people, I have several classes (for a Form generator class thing I'm making...I know sad.. :( ),anyway, the hierarchy is as follows:
class HTML_Form accepts abstract class FormElement objects (using type hinting). FormElement class has several children classes such as Textbox, Password, Radio .etc
How would I add validation to these, for example the method I'm trying to make in class HTML_Form is:
$form = new HTML_Form($name);
$form->addElement($type, $name, $validation);
I hope everybody understand... and yes I'm such a noob.