I need a simple Ruby on Rails program that asks the user for some information and stores it in the database. The only tricky part is that it must do both client and server side validation. The client side validation must use javascript to provide feedback to the user - text next to each field should display "OK" if that field meets the specifications and "Not OK -- Reason XXXXX" if it does not. Also, the submit button should not work until all of the fields are validated.
You can just create the model, views and controllers, etc. I will be extracting the code and using it for an existing project.
The following fields the user must enter for validation:
Zip code - matches the list that I attached
State - not entered by user, must be looked up from zip code
Phone number - must be 10 digits, only ()-. are allowed in addition to the numbers
Email address - must be in valid email address format
Street address - must not be blank