How to use the webiny-validation.validation.getValidator function in webiny-validation

To help you get started, we’ve selected a few webiny-validation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / packages / webiny-form / src / validation.js View on Github external
getValidator(name: string): Validator {
        const validator = validation.getValidator(name);
        if (!validator) {
            throw new ValidationError("Validator `" + name + "` does not exist!", name);
        }
        return validator;
    }

webiny-validation

A simple data validation library, packed with frequently used validators.

MIT
Latest version published 5 years ago

Package Health Score

66 / 100
Full package analysis