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.
精彩评论