Simple config validation.
Validate configuration with the built in validation in the browser, for most common use cases such as required, simple formatting (mail, url tel) and so on.
Installation
Section titled “Installation”npm i @soleil-se/config-validateIn ./config/config.js or ./config_global/config.js we need to register the validate function on the window object.
https://developer.sitevision.se/docs/webapps/configuration/config.js#h-Validate
import { registerConfigValidate } from '@soleil-se/config-validate';
registerConfigValidate();import validate from '@soleil-se/config-validate';
window.validate = validate;All styling that is needed is appended to head.
To add a required asterisk after a label add the class control-label--required.
<div class="form-group"> <label class="control-label control-label--required">Text</label> <input class="form-control" name="text" required></div>