protected function _validate($state)
    {
        // Unique values can't be null or empty string.
        if (empty($state->value) && !is_numeric($state->value)) {
            return false;
        }

        if (is_array($state->value)) {
            // The first element of the array can't be null or empty string.
            $first = array_slice($state->value, 0, 1);
            if (empty($first) && !is_numeric($first)) {
                return false;
            }
        }

        return true;
    }
protected function _validate($state)
    {
        // Unique values can't be null or empty string.
        if (empty($state->value) && !is_numeric($state->value)) {
            return false;
        }

        if (is_array($state->value)) {
            // The first element of the array can't be null or empty string.
            $first = array_slice($state->value, 0, 1);
            if (empty($first) && !is_numeric($first)) {
                return false;
            }
        }

        return true;
    }
protected function _validate ( $ state ) { // Unique values can't be null or empty string. if ( empty ( $ state -> value ) && ! is_numeric ( $ state -> value ) ) { return false ; } if ( is_array ( $ state -> value ) ) { // The first element of the array can't be null or empty string. $ first = array_slice ( $ state -> value , 0 , 1 ) ; if ( empty ( $ first ) && ! is_numeric ( $ first ) ) { return false ; } } return true ; }
Validate a unique state.

@param  object  The state object.

@return bool True if unique state is valid, false otherwise.
Validate a unique state .