orator icon indicating copy to clipboard operation
orator copied to clipboard

how to providde validation model attributes in orator orm?

Open vimox-shah opened this issue 8 years ago • 2 comments
trafficstars

@sdispater can you tell me how to give validation for model fields?

vimox-shah avatar Mar 17 '17 15:03 vimox-shah

For now, there is no built-in validation system.

However, if you want to ensure the model is correct before saving it you can use events like documented in the documentation: https://orator-orm.com/docs/0.9/orm.html#cancelling-save-operations-via-events

sdispater avatar Mar 20 '17 17:03 sdispater

@vimox-shah I have a library that can help with that, I'm working on a new documentation side for it.

https://github.com/alfonsocv12/orator_validator

alfonsocv12 avatar Feb 17 '21 23:02 alfonsocv12