Gorm: Are there validation flags for GORM??

Created on 1 May 2016  路  2Comments  路  Source: go-gorm/gorm

Are there validation flags for GORM like maxlength minlength, looking through the docs I don't see any other than Unique or Not Null

Most helpful comment

No, but you could checkout this one. https://github.com/qor/validations

All 2 comments

I ended up using a library like this:
https://github.com/go-playground/validator

Validate yourself before persisting to a DB

Validation should be handled outside of GORM IMHO

No, but you could checkout this one. https://github.com/qor/validations

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kumarsiva07 picture kumarsiva07  路  3Comments

youtwo123 picture youtwo123  路  3Comments

Ganitzsh picture Ganitzsh  路  3Comments

Quentin-M picture Quentin-M  路  3Comments

hypertornado picture hypertornado  路  3Comments