Skip to content

"should be equal to one of the allowed values" error on choice field #47

@jakub-zawislak

Description

@jakub-zawislak

I'm using liform-react with LiformBundle. I have a form:

$builder->add('someField', EntityType::class, [
    'label' => $this->getLabel($contact),
    'required' => false,
    'class' => 'Entity\SomeEntity',
]);

Object generated by liform:

properties: {
  someField: {
    enum: ["1", "2", "3"],
    enum_titles: ["one", "two", "three"],
    // ...
  }
}

After selecting an option, ajv returns validation error

"should be equal to one of the allowed values"

https://github.com/epoberezkin/ajv/blob/1c702d639cbf1d97dd8d44822bcaac43b3c4dc6f/lib/dot/errors.def#L102

On backend there is no validation errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions