hysios / ember-cli-ember-validations

Ember Validations for Ember-cli
0 stars 1 forks source link

specify validate rule to another variable #5

Closed feitian124 closed 10 years ago

feitian124 commented 10 years ago
{{#validate-with propertyBinding="user.login"}}
  <label>
    {{validate-message}}
  </label>
  {{input valueBinding="user.login"}}
{{/validate-with}}

in above use case, user.login is where the input value stored and validate rule stored. what if i want to validate a custom variable? myname

{{#validate-with propertyBinding="user.login"}}
  <label>
    {{validate-message}}
  </label>
  {{input valueBinding="myname"}}
{{/validate-with}}