Adds form validation