groupoffice icon indicating copy to clipboard operation
groupoffice copied to clipboard

Validation change in Entity model

Open mschering opened this issue 5 years ago • 0 comments

Currently internalSave() calls internalValidate(). Which will validate all related properties too. But when you call public validate() it will only validate the entity and not the properties. This must be changed so that internalValidate will recurse through all properties and internalSave won't need to call this anymore. public save() can call this.

Secondly, currently Property uses the database scheme to validate required properties and string lengths etc. This needs to be easily overridable when you know a property will be filled by internalSave. So there needs to be a new validation rules object that will be generated from the database scheme but can be overridden in a property or entity.

mschering avatar Mar 15 '19 08:03 mschering