talyssonoc/structure

validation for specific attribute

LiranBri opened this issue · 0 comments

Is there a way to validate the value of an attribute on the attribute level?

for example, suppose Person has a "name" attribute which should be at least 3 characters.
can I test whether a specific value is a valid value for "name"?

If not, how can we validate a partial update operation? sometimes the client-side would send a request to update just a specific field of an entity (update the name of a specific person record). without this, we would have to fetch the existing person record, modify it with the updated attribute, and then run validate.. redundant extra fetch from DB

thank you