Closed wgnf closed 2 years ago
Somehow the ValidationResult should receive or have information regarding the Field that is validated, so that users that are using the NZazuView.Validate() method can receive such information.
The way that i have in my mind currently, is to pass in a new parameter into the IValueCheck.Validate() Function for the fieldname (key). But that would require a lot of changes.
Is there a cleaner way?
@DatMaddin Usually wpf-validation is used to support visual adorners, i.e. adding a visual cue for the user on the field that failed during validation (see examples). So the adorner should highlight the validation error at the corresponding field telling you exactly what field failed the RequiredValidation.
Maybe, i am missing something here. Is there a proper use case for using NZazuView.Validate()
programmatically? Is this an NZazuFiddle issue, i.e. inproper binding of binding validation errors to the view?
@DatMaddin Also for the other issues you opened: Try to provide user value/context. What is the user trying to achieve? Where does this issue raise?
@htochenhagen @janbo485 Probably GitHub Issue Templates would be a good idea on enhancing guidance on the repository.
@mkoertgen I will have a look on a visual feedback, that you mentioned, thanks.
We're using the Validate()
function to check if everything is ok with a given view before saving the values to the database.
And that's not a NZazuFiddle issue.
Ah, i see. Probably you are using one thing for two purposes. Check back with @ThomasLey on this. He should be able to give some guidance on this.
Happy coding!
When a field is marked as
required
, like so:And the template get's validated, an error with the message
This field is required
will be thrown.The Message points to a field (this), but there's no information about the field! There should be an information (just the name) about the affected field, like:
This field is required: {field}
This should be the case for all fields and also other controls (e.g. columns indatatable
s)If no information like this is given, an editor, that has no access to the JSON-representation of the template, doesn't know which field he's missing out.