Validate a form against a set of rules.