Completed server-side form validation for sample