protected function constraintMessages(Constraint $constraint)
    {
        $result = [];
        if (isset($constraint->min) && $constraint->min !== null) {
            $count = new Count(['min' => $constraint->min]);
            $length = new Length(['min' => $constraint->min]);
            $result[] = $constraint->minMessage;
        }
        if (isset($constraint->max) && $constraint->max !== null) {
            $count = new Count(['max' => $constraint->min]);
            $length = new Length(['max' => $constraint->min]);
            $result[] = $constraint->maxMessage;
        }
        if (isset($constraint->exactMessage)
            && $constraint->exactMessage !== $count->exactMessage
            && $constraint->exactMessage !== $length->exactMessage
        ) {
            $result[] = $constraint->exactMessage;
        }

        return $result;
    }
protected function constraintMessages(Constraint $constraint)
    {
        $result = [];
        if (isset($constraint->min) && $constraint->min !== null) {
            $count = new Count(['min' => $constraint->min]);
            $length = new Length(['min' => $constraint->min]);
            $result[] = $constraint->minMessage;
        }
        if (isset($constraint->max) && $constraint->max !== null) {
            $count = new Count(['max' => $constraint->min]);
            $length = new Length(['max' => $constraint->min]);
            $result[] = $constraint->maxMessage;
        }
        if (isset($constraint->exactMessage)
            && $constraint->exactMessage !== $count->exactMessage
            && $constraint->exactMessage !== $length->exactMessage
        ) {
            $result[] = $constraint->exactMessage;
        }

        return $result;
    }
protected function constraintMessages ( Constraint $ constraint ) { $ result = [ ] ; if ( isset ( $ constraint -> min ) && $ constraint -> min !== null ) { $ count = new Count ( [ 'min' => $ constraint -> min ] ) ; $ length = new Length ( [ 'min' => $ constraint -> min ] ) ; $ result [ ] = $ constraint -> minMessage ; } if ( isset ( $ constraint -> max ) && $ constraint -> max !== null ) { $ count = new Count ( [ 'max' => $ constraint -> min ] ) ; $ length = new Length ( [ 'max' => $ constraint -> min ] ) ; $ result [ ] = $ constraint -> maxMessage ; } if ( isset ( $ constraint -> exactMessage ) && $ constraint -> exactMessage !== $ count -> exactMessage && $ constraint -> exactMessage !== $ length -> exactMessage ) { $ result [ ] = $ constraint -> exactMessage ; } return $ result ; }
Parses the constraint message.

@param \Symfony\Component\Validator\Constraint $constraint The constraint

@return array
Parses the constraint message .