Skip to content

Refactored form validation

FEATURES:

  • attributeCaptions section to define custom attributes captions or redefine for entity ones;
  • UFormRow: new attributeName 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;
  • 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;
  • 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)

REFACTOR:

  • new provided validator object in Vue instances, with useful helper methods for validation;
  • deleted getValidationState provided value since now it is a method of validator;
Edited by Andrii Bezuglyi

Merge request reports

Loading