validating and highlighting fields