Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ember-Validations - Don't validate automatically

I am using ember-validations to validate a model in a form.

If I create the record with createRecord the instance of the model is already validated and therefore the form already shows validations errors before the user inputs values.

I just want to validate the model before submitting the form. Is there a way?

like image 377
Ben Avatar asked Feb 20 '26 11:02

Ben


1 Answers

You need to add a conditional validator ('if' or 'unless') and activate it only when submitting the form.

Here is a quick example: http://jsbin.com/letujimu/1/edit?html,js,output

like image 80
espiritudelvino Avatar answered Feb 22 '26 01:02

espiritudelvino