UNPKG

@snups/rjsf-validator-ajv8

Version:
13 lines 764 B
import AJV8Validator from './validator.js'; /** Creates and returns a customized implementation of the `ValidatorType` with the given customization `options` if * provided. If a `localizer` is provided, it is used to translate the messages generated by the underlying AJV * validation. * * @param [options={}] - The `CustomValidatorOptionsType` options that are used to create the `ValidatorType` instance * @param [localizer] - If provided, is used to localize a list of Ajv `ErrorObject`s * @returns - The custom validator implementation resulting from the set of parameters provided */ export default function customizeValidator(options = {}, localizer) { return new AJV8Validator(options, localizer); } //# sourceMappingURL=customizeValidator.js.map