How to validate entity versus current state? #181
-
Hi, Do we have a validator for that? When validating one parameter the code doesn't look that bad, but the problem happens when we have entities with multiple parameters that can be changes, and others that are read only. We did a custom validator like this:
In advance, thanks for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @leandrodotec, first up apologies for delayed response. There is currently no out-of-the-box validator to verify whether certain fields are read-only and check they have not changed. The way you have it is the long-hand way I would do for a single property. If you had more than one property then I would override the The validation framework is extensible, so you could add a new if needed, even contribute it back into beef :-) |
Beta Was this translation helpful? Give feedback.
Hi @leandrodotec, first up apologies for delayed response. There is currently no out-of-the-box validator to verify whether certain fields are read-only and check they have not changed. The way you have it is the long-hand way I would do for a single property. If you had more than one property then I would override the
OnValidateAsync
method and do there as more efficient.The validation framework is extensible, so you could add a new if needed, even contribute it back into beef :-)