pklaschka/xd-dialog-helper

Add option to validate form inputs

Closed this issue · 2 comments

Add an option to validate form inputs and disallow submitting the form when the input is not valid.

One idea for this would be a new callback that gets passed with the options. This would (getting passed the form values) – e.g. – return validation error messages if the form is invalid or something like null to indicate the form is valid and the submission can "continue".

The question is where validation error messages could get displayed. If anyone has suggestions, please feel free to mention them here 😉

For now, I'll just implement this so that it will disable or enable the ok button, a more "complex" behavior might get implemented later...