Use closure for form validation.