react-jsonschema-forms validator error - Cannot read properties of undefined (reading 'replace')

I'm trying to build dynamic forms using rjsf and having some issues with the validator.

enter image description here

This corresponds to this line in the code:

var property = instancePath.replace(/\//g, ".");

My schema is:

const testSchema = {
    "type": "object",
    "required": [
        "account",
    ],
    "properties": {
        "reference": {
            "type": "string",
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua",
            "nullable": true,
        },
        "account": {
            "type": "integer",
            "format": "int64",
            "pattern":"^(0|[1-9][0-9]*)$",
        }
    },

    "additionalProperties": false
};

import Form from "@rjsf/bootstrap-4";
import validator from "@rjsf/validator-ajv8";

return <>
    { schema && <Form 
        schema={testSchema}
        uiSchema={uiSchema}
        validator={validator}
        onSubmit={onSubmit}
        noHtml5Validate={true}
        formData={formData}
        onChange={(e)=> onChangeHandler(e.formData)}
    />}</>;


Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept