Code for activeweb form validation.