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
npm i @soleil-se/config-validate
Usage
In ./config/config.js
import and overwrite the validate function.
https://developer.sitevision.se/docs/webapps/configuration#h-configjs
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>