dirty checkecking to avoid showing invalid field messages for the first time