Live Validation

Last modified by Anca Luca on 2023/10/20

XWiki bundles the LiveValidation library. You can read its examples or the full documentation on their website. You may also be interested by the LiveValidation Macros extensions.

Example of use in XWiki

{{velocity output=false}}

<form method="get" action="">
 <p><input type="text" name="fruits" class="mandatory"/></p>
 require(['jquery'], function ($) {
    $(function () {
     var mandatoryInputs = $('input.mandatory');
       var valid = new LiveValidation( this, { validMessage: "OK!", wait: 500 } );
       valid.add( Validate.Presence, { failureMessage: "Mandatory" } );        

Get Connected