working validations added $pristine check