vazco / uniforms

A React library for building forms from any schema.

Home Page:https://uniforms.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning: Failed prop type: Invalid prop `required` of type `array` supplied to `ForwardRef(FormControl)`, expected `boolean`.

neuralsea-lab opened this issue · comments

Received warning above for required: [], field in schema below. Setting required: true does not work - it is definitely an array that is expected.
For schema:

const schema: JSONSchemaType<Kloud8Data> = {
    title: 'Kloud8 Request',
    type: 'object',
    properties: {
        useCaseDescription: { type: 'string', uniforms: { component: LongTextField } },
        resourceQuotas: {
            type: 'object',
            properties: {
                minMemory: { type: 'number', minimum: 128, uniforms: { component: MemoryQuotaField } },
                minCpu: { type: 'number', minimum: 100, uniforms: { component: CPUQuotaField } },
                maxMemory: { type: 'number', maximum: 256, uniforms: { component: MemoryQuotaField } },
                maxCpu: { type: 'number', maximum: 200, uniforms: { component: CPUQuotaField } },
            },
            required: [],
        },
   }
}

Hi @neuralsea-lab. If it's just a warning, it shouldn't cause any issues. Please share what theme (and version) are you using.