# How to do Validation with angular JS/ionic Framework

**URL:** <https://forum.ionicframework.com/t/how-to-do-validation-with-angular-js-ionic-framework/265>\
**Category:** ionic-v1\
**Created:** [December 16, 2013, 12:15pm UTC](https://forum.ionicframework.com/t/how-to-do-validation-with-angular-js-ionic-framework/265 "2013-12-16T12:15:52Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![zwz](https://avatars.discourse-cdn.com/v4/letter/z/ecc23a/32.png) [@zwz](https://forum.ionicframework.com/u/zwz)\
**Post date:** [May 22, 2014, 1:25pm UTC](https://forum.ionicframework.com/t/how-to-do-validation-with-angular-js-ionic-framework/265/36 "2014-05-22T13:25:11Z")

</div>

I see. Here comes my two questions:

1. How can I get which field failed and show the hint for the invalidation?
2. In my case, I have two button for a form, whichever the user clicks the form has to be validated, and then some diffrent things has to done if the form is valid. I tried to apply the directive “on-valid-submit” on the two buttons, but I failed. How should do it?

Thank you 🙂

---

_[View the full topic](https://forum.ionicframework.com/t/how-to-do-validation-with-angular-js-ionic-framework/265)._
