![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@rjsf/validator-ajv6
Advanced tools
AJV-6 based validator plugin for react-jsonschema-form
.
Explore the docs »
View Playground
·
Report Bug
·
Request Feature
Exports validator-ajv6
plugin for react-jsonschema-form
.
NOTE: This package is deprecated in favor of the
@rjsf/validator-ajv8
and is provided primarily for people upgrading to version 5 who initially want to minimize the validator differences.
@rjsf/utils >= 5.0.0
yarn add @rjsf/core
yarn add @rjsf/validator-ajv6
import { RJSFSchema } from '@rjsf/utils';
import Form from '@rjsf/core';
import validator from '@rjsf/validator-ajv6';
const schema: RJSFSchema = {
type: 'string',
};
<Form schema={schema} validator={validator} />;
or, using a more complex example using custom validator with custom formats
import { RJSFSchema } from '@rjsf/utils';
import Form from '@rjsf/core';
import { customizeValidator } from '@rjsf/validator-ajv6';
const customFormats = {
'phone-us': /\(?\d{3}\)?[\s-]?\d{3}[\s-]?\d{4}$/,
};
const validator = customizeValidator({
customFormats,
});
const schema: RJSFSchema = {
type: 'string',
format: 'phone-us',
};
<Form schema={schema} validator={validator} />;
or, using a more complex example using a custom with additional meta schema
import { RJSFSchema } from '@rjsf/utils';
import Form from '@rjsf/core';
import { customizeValidator } from '@rjsf/validator-ajv6';
const metaSchemaDraft04 = require('ajv/lib/refs/json-schema-draft-04.json');
const validator = customizeValidator({
additionalMetaSchemas: [metaSchemaDraft04],
});
const schema: RJSFSchema = {
$schema: 'http://json-schema.org/draft-04/schema#',
type: 'string',
};
<Form schema={schema} validator={validator} />;
or, using a more complex example using custom validator config override options
import { RJSFSchema } from '@rjsf/utils';
import Form from '@rjsf/core';
import { customizeValidator } from '@rjsf/validator-ajv6';
const validator = customizeValidator({
ajvOptionsOverrides: {
$data: true,
verbose: true,
},
});
const schema: RJSFSchema = {
type: 'string',
};
<Form schema={schema} validator={validator} />;
Finally, you can combine both additional meta schemas, custom formats and custom validator config override options.
import { RJSFSchema } from '@rjsf/utils';
import Form from '@rjsf/core';
import { customizeValidator } from '@rjsf/validator-ajv6';
const metaSchemaDraft04 = require('ajv/lib/refs/json-schema-draft-04.json');
const customFormats = {
'phone-us': /\(?\d{3}\)?[\s-]?\d{3}[\s-]?\d{4}$/,
};
const validator = customizeValidator({
additionalMetaSchemas: [metaSchemaDraft04],
customFormats,
ajvOptionsOverrides: {
$data: true,
verbose: true,
},
});
const schema: RJSFSchema = {
$schema: 'http://json-schema.org/draft-04/schema#',
type: 'string',
format: 'phone-us',
};
<Form schema={schema} validator={validator} />;
See the open issues for a list of proposed features (and known issues).
Read our contributors' guide to get started.
rjsf team: https://github.com/orgs/rjsf-team/people
GitHub repository: https://github.com/rjsf-team/react-jsonschema-form
FAQs
The ajv-6 based validator for @rjsf/core
The npm package @rjsf/validator-ajv6 receives a total of 7,359 weekly downloads. As such, @rjsf/validator-ajv6 popularity was classified as popular.
We found that @rjsf/validator-ajv6 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.