hysios / ember-cli-ember-validations

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

inline syntax #1

Closed feitian124 closed 3 years ago

feitian124 commented 10 years ago

block syntax is flexible and easy to custom your own layout:

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

but for simple case, block syntax is too long and redundant, please consider add inline syntax for simple case, like below:

{{validate-with value="user.login"}}
feitian124 commented 10 years ago

and also, if inline syntax is added, it is easy to find that the name validate-with is not clear enough, how about change to input-validate?

hysios commented 10 years ago

@feitian124 input-validate syntax is surely clear && simple, but validate-with && validate-message parameters is not going stable, we quickly add input-validate shortcuts for validate-with with {{input}} after a few days.