base64 validator

Validate a base64 encoded string

Options

Use with form field

The HTML attributes are used to set the validator options via the Declarative plugin

Name HTML attribute Type Description
message data-fv-base64___message String The error message

Use with JavaScript module


// You might need to change the importing path
import base64 from 'formvalidation/validators/base64';

const result = base64().validate({
    value: ...,
    options: {
        message: ...,
    },
});
/*
result is an object of
{
    valid: true or false,
    message: The error message
}
*/