custom form validation error handling