ardent icon indicating copy to clipboard operation
ardent copied to clipboard

Validate input but not store it in the database

Open stlouisweb opened this issue 11 years ago • 1 comments

How would I validate that a boolean input (a checkbox for example) is true, but not store its value in the database?

stlouisweb avatar Jul 28 '14 19:07 stlouisweb

You can use the validate or validateUniques methods on your ardent model both methods will return a boolean and populate the models validation validationErrors property if there are errors.

The difference between the two methods is that the validateUniques method will update any unique constraint rules so they work correctly when updating a record (so it doesn't validate against itself)

carbontwelve avatar Feb 12 '15 11:02 carbontwelve