[cookbook] basic form validation