Open sandrina-p opened 8 months ago
This issue might be out of scope for json-schema-form
. We are discussing internally the possibility of deprecating customProperties
in favor of moving mutations to JSON Schemas outside createHeadlessForm()
.
So in this case, we'd instead recommend doing this:
import mutate from 'json-schema-form';
const newSchema = mutate(schema, {
fields: {
year: {
"x-jsf-errorMessage": {
required: "Cannot be empty (custom error)"
}
},
}
});
const form = createHeadlessForm(newSchema)
Given the following JSON Schema, I cannot override its
errorMessage
usingcreateHeadlessForm()
JSF Config: