More correct validation for form fields.