# CRUDlex\UniqueValidator

class `UniqueValidator`

  A validator to check for an unique field.

  `isValidUniqueMany`($value, AbstractData $data, Entity $entity, $field)

    Checks whether the unique constraint is valid for a many-to-many field.

    Parameters: | $value (array) – the value to check $data (AbstractData) – the data to perform the check with $entity (Entity) – the entity to perform the check on $field –
    Returns: | boolean true if it is a valid unique many-to-many constraint

  `isValidUnique`($value, AbstractData $data, Entity $entity, $field, $type)

    Performs the regular unique validation.

    Parameters: | $value – $data (AbstractData) – $entity (Entity) – $field – $type –
    Returns: | boolean true if everything is valid

  `isValid`($value, $parameters)

    {@inheritdoc}

    Parameters: | $value – $parameters –

  `getInvalidDetails`()

    {@inheritdoc}