How to use the @talend/json-schema-form-core.validate function in @talend/json-schema-form-core

To help you get started, we’ve selected a few @talend/json-schema-form-core 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 Talend / ui / packages / forms / src / UIForm / utils / validation.js View on Github external
export function validateValue(schema, value, properties, customValidationFn) {
	const validationSchema = adaptAdditionalRules(schema);
	const staticResult = validate(validationSchema, value);
	if (staticResult.valid && schema.customValidation && customValidationFn) {
		return customValidationFn(schema, value, properties);
	}
	return staticResult.valid ? null : staticResult.error.message;
}

@talend/json-schema-form-core

JSON-Schema and JSON-UI-Schema utilities for form generation.

MIT
Latest version published 5 months ago

Package Health Score

62 / 100
Full package analysis