Input data validation
It seems that NoesisGUI doesn't currently provide a standard way to validate input data. Is there any plan to support it in the future ?
# In WPF, the standard methods include the use of INotifyDataErrorInfo and IDataErrorInfo (ref: https://stackoverflow.com/questions/195 ... on-c-sharp).
Do you have any sample to achieve similar behavior with the current NoesisGUI ?
# In WPF, the standard methods include the use of INotifyDataErrorInfo and IDataErrorInfo (ref: https://stackoverflow.com/questions/195 ... on-c-sharp).
Do you have any sample to achieve similar behavior with the current NoesisGUI ?
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Input data validation
Yes, we have plans to incorporate data validation to bindings.
We don't have an example showing this kind of error validation. Right now it can only be achieved by exposing new properties in the ViewModel that can be used in the TextBox template to show the errors.
We don't have an example showing this kind of error validation. Right now it can only be achieved by exposing new properties in the ViewModel that can be used in the TextBox template to show the errors.
Re: Input data validation
Any news on this?
Is any of the WPF mechanisms implemented in the meanwhile?
ValidateOnExceptions for example is not working...
EDIT: To extend the question a bit: is there a way to react on an exception thrown in a binding? That's one of the ways WPF handles validations via ValidatesOnExceptions.
Is any of the WPF mechanisms implemented in the meanwhile?
ValidateOnExceptions for example is not working...
EDIT: To extend the question a bit: is there a way to react on an exception thrown in a binding? That's one of the ways WPF handles validations via ValidatesOnExceptions.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Input data validation
Unfortunately there is no data validation implemented yet. Could you please create a ticket in our bugtracker asking for this feature?
As I said before the only alternative is extending viewmodel with properties that can be used in the data templates to show validation states.
As I said before the only alternative is extending viewmodel with properties that can be used in the data templates to show validation states.
Re: Input data validation
Thanks for your response!
Since we have panels with 30-40 text boxes that would clutter our view models just because of validation properties. Not sure yet how to work around this...
I'd still prefer to simply throw exceptions in the VM properties and handle them in the UI but since the exceptions are silently swallowed by Noesis, I can't find a way to react to them.
But I'll find a way and I'll probably post our approach here. ;-)
Since we have panels with 30-40 text boxes that would clutter our view models just because of validation properties. Not sure yet how to work around this...
I'd still prefer to simply throw exceptions in the VM properties and handle them in the UI but since the exceptions are silently swallowed by Noesis, I can't find a way to react to them.
But I'll find a way and I'll probably post our approach here. ;-)
- kristoffer
- Posts: 8
- Joined:
Re: Input data validation
+1 on this.
I guess this is the tracking issue regarding this subject.
https://www.noesisengine.com/bugs/view.php?id=1244
I guess this is the tracking issue regarding this subject.
https://www.noesisengine.com/bugs/view.php?id=1244
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 79 guests