validating fields