src/Ouzo/Core/Validatable.php
public function validateUnique(array $values, $errorMessage, $errorField = null)
    {
        if (count($values) != count(array_unique($values))) {
            $this->error($errorMessage);
            $this->_errorFields[] = $errorField;
        }
    }
public function validateUnique(array $values, $errorMessage, $errorField = null)
    {
        if (count($values) != count(array_unique($values))) {
            $this->error($errorMessage);
            $this->_errorFields[] = $errorField;
        }
    }
public function validateUnique ( array $ values , $ errorMessage , $ errorField = null ) { if ( count ( $ values ) != count ( array_unique ( $ values ) ) ) { $ this -> error ( $ errorMessage ) ; $ this -> _errorFields [ ] = $ errorField ; } }
Checks whether array does not contain duplicate values
@param array $values - array to check
@param $errorMessage - error message
@param null $errorField
Checks whether array does not contain duplicate values