Ratufa Documentation

Input validations

Ratufa will validate all form submissions based on the validations you have configured in this page.

When you load a form for the first time, Ratufa will load any validations you already have on the form. For example, if you have a "required" validation in your HTML input field like this:

<input type="text" name="first_name" required />

Then Ratufa will load the required validation along with the input field.

You can turn on/off the validations in the Form Settings → Input Validations page, irrespective of whether the validations are present in the original HTML form or not. That means you can connect a plain HTML form without any validations to Ratufa and then add any of the validations directly in the Ratufa settings.

Customize the error message

Ratufa will display a default error message when the validation fails. You can customize the error message. Custom Error Message

Displaying the error message

Ratufa loader script will display the validation error messages just below the input field by default. Displaying error message in the form

For Group elements such as Radio button groups, the error message is displayed at the bottom of the common parent element. That means, the individual radio button elements should have a common parent element for the error message to appear well.

Example:

<div class="mb-5">
<div class="form-check">
    <input class="form-check-input" type="radio" name="color" id="greenRadio" value="green" >
    <label class="form-check-label" for="greenRadio">
    Green
    </label>
</div>
<div class="form-check">
    <input class="form-check-input" type="radio" name="color" id="blueRadio" value="blue">
    <label class="form-check-label" for="blueRadio">
        Blue
    </label>
</div>
<div class="form-check">
    <input class="form-check-input" type="radio" name="color" id="yellowRadio" value="yellow" >
    <label class="form-check-label" for="yellowRadio">
        Yellow
    </label>
</div>

<!-- The error message will be appended here -->

</div>