Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4830

Ember validate change validatrors

$
0
0

@pictaile wrote:

I use ember-validations . I have mixin validations:

`export default Ember.Mixin.create(EmberValidations, {
    validations: {
        "model.login": {
            presence: true,
            length: {minimum: 8, maximum: 14}
        },
        "model.pass": {
            numericality: true,
            length: {minimum: 4, maximum: 9}
        }
    },
});`

have controller when i call validate

export default Ember.Controller.extend(AuthValidations, {
    action {

           click : function () {
                this.validate().then(function (){
                    self.get('auth')(model, self);
                }).catch(function (err){
                    model.set('loader_btn', false);
                    self.set('error', err.model);
                })
          },

          click2: function() {
                 //VALIDATE ONLY ONE INPUT
          }


    }

and function click validate form with 2 input.

But click2 i want validate ONLY one input.

How do it ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4830

Trending Articles