prevent hidden errors occur when forms submitted without ajax