addElement(new Kod_Field("username", "Username", Kod_Field::text, null, "Please enter username"));
$fusername->addValidator(new Regex_Validator("'\w*'", "Username can hold only numbers and letters"));
$fusername->addValidator(new Size_Validator(10, 4, "Username must be 4 to 10 letters long."));
$fpassword =& $form->addElement(new Kod_Field("password", "Password", Kod_Field::password, null, "Please enter password"));
$fpassword->addValidator(new Regex_Validator("'\w*'", "Password can hold only numbers and letters."));
$fpassword->addValidator(new Size_Validator(10, 4, "Password must be 4 to 10 letters long."));
$form->addElement(new Kod_Submit("slogin", "Login"));
?>
Kod_Form_Test
isSubmited() && $form->isValid()){
?>
You are in. ( Your username: username->getValue();?>, Your password: password->getValue();?>)
display();
?>