protect dialog hide 
when dialog form validation fail