Not set property if validation behavior fails. #900
Unanswered
Stefan13-13
asked this question in
Q&A
Replies: 0 comments 1 reply
-
An alternative approach would be to have a method
Any guidance would be appreciated. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a ValidationBehavior Invalidates a value, can I prevent the setter from being called (or know this in the setter so I can prevent the invalid value to be assinged to my field)?
I have an entry:
My property is just basic
It validates if the port number is an integer and in a valid range.
If the value is not valid, the
InvalidEntryStyle
is used which is good.However, the invalid value does get stored in the property, meaning that I have to check/validate the property value wherever I use it.
I hope to prevent just that by validating the input. Only when the input is valid, the value should get stored.
Beta Was this translation helpful? Give feedback.
All reactions