Hi, I am trying to write a custom validator to validate a birthdate which the user enters using three input fields, e.g.
<input type="text" name="day" ng-model="person.day" /> <input type="text" name="month" ng-model="person.month" /> <input type="text" name="year" ng-model="person.year" /> Together, they have to make up for a valid date object, otherwise they should invalidate the form and display a warning to the user. How should I go about this using directives? I'm comfortable validating a single field, but I am unsure how to combine dependent fields such as these. As I will be using this more often, I'd like to prevent building a function directly in the controller. I can't wrap my head around the documentation regarding this. Any help will be appreciated. Thanks! -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
