Skip to content

UniqueObject Validators doesn't work if you give the column a different name, than the fields name. #377

Description

@DennisDobslaf

UniqueObject Validators doesn't work if you give the column a different name, than the fields name.

So, if you have an user entity with id as identifier and name the column like 'user_id' (so, the webform also contains a field names 'user_id' the validator will fail at`

if (!isset($context[$columnName])) {

because, there is no 'id' (but 'user_id') in the form.

So, as renaming columns is a supported behaviour shouldn't the UniqueObject validator rely on the choosen/given columnName?

If have a working example here, but don't know, if it is correct in all ways...
Could make a pull request for that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions