eManPrague / frui.ts

Pragmatic MVVM frontend framework
MIT License
14 stars 5 forks source link

Easily replaceable `getValidationMessage` function #34

Closed kopecmi8 closed 2 years ago

kopecmi8 commented 3 years ago

If you want to use own validator instead of prepared one could be usefull to easily replace getValidationMessage helper.

Almost every control use this helper function to detect if the error is visible.

For example if you need show error "onBlur" of input, the only way how to do its own implementation of each input or monkey patch the ControlBase prototype and override whole getValidationError method. With configurable helpers this could be much more comfortable.

gius commented 2 years ago

@kopecmi8 Is this resolved with the new validation package?