Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required field in schema #263

Open
georgecoca opened this issue Jul 28, 2023 · 1 comment
Open

Required field in schema #263

georgecoca opened this issue Jul 28, 2023 · 1 comment

Comments

@georgecoca
Copy link

Is it possible to make a field required in provided schema?

const schema = {
	foo: {
		type: 'number',
		maximum: 100,
		minimum: 1,
		default: 50
	},
	bar: {
		type: 'string', // make it required
		format: 'url'
	}
};

const store = new Store({schema});

Thank you

@AutismPatient
Copy link

Hello, you can refer to JSON Schema standard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants