开发者

Is there such a thing as a ValidationWarningResult?

开发者 https://www.devze.com 2023-04-02 15:03 出处:网络
I have a whole list of validation rules that are either warnings (can continue) or fatal (cannot continue).

I have a whole list of validation rules that are either warnings (can continue) or fatal (cannot continue).

The fatals are easy, but the warnings are stumping me as far as a succinct way to set them up. I can handle t开发者_JAVA技巧he warnings easily enough, but it is messy.

Is there a declarative way to handle 'warnings'?


No, there isn't. I ended up adding a flag 'ValidateAll' to my entities and use that to force the warnings to become errors depending on state.

0

精彩评论

暂无评论...
验证码 换一张
取 消