Refactored form validation
FEATURES:
-
attributeCaptions
section to define custom attributes captions or redefine for entity ones; -
UFormRow
: newattributeName
prop:- automatically get label using metadata and the new
attributeCaptions
section (see above) - automatically show asterisk for required fields using metadata
- automatically show error text, if value is invalid, including text of custom rules (
validateWithErrorText
helper, see below) - display attribute description if exists instead of name when we hover on the label;
- automatically get label using metadata and the new
- automate error text for UFormRow, including text for custom validation rules.
- add new helper
validateWithErrorText
for defining of attribute validation functions with an error text;
- add new helper
- component-level validations for popup dialogs:
- add
validationMixin
for the passing of validation defined locally in some Vue component to nested controls (UFormRow for example)
- add
REFACTOR:
- new provided
validator
object in Vue instances, with useful helper methods for validation; - deleted
getValidationState
provided value since now it is a method ofvalidator
;
Edited by Andrii Bezuglyi