Validate a form