Reputation: 892
I have a validation rules set up and they work.
this.validation.on(user).ensure('name').isNotEmpty()...
But how can I trigger validation in activate method? I have tried
this.validation.validate();
but the fields in the form don't change (validation errors are not displayed). Only when I start typing the validation messages are displayed on the form.
Upvotes: 0
Views: 375
Reputation: 616
activate
happens in the lifecycle before the form (viewmodel) is attached to the DOM. Try calling the method like you were in the attached
callback and see how you go.
the lifcycle order I am aware of is:
Upvotes: 1