References PropertySchemaRangeRestriction
Reference
C
Class

ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRangeRestriction

class ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRangeRestriction implements ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRestrictionMetadataInterface
{
    public create(Symfony\Component\Validator\Constraints\Range $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): array
    public supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): bool
}

Methods

create

Creates json schema restrictions based on the validation constraints.

public create(Symfony\Component\Validator\Constraints\Range $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): array

Parameters

constraintSymfony\Component\Validator\Constraints\Range
propertyMetadata`ApiPlatform\Metadata\ApiProperty`

Returns

array

supports

Is the constraint supported by the schema restriction?

public supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): bool

Parameters

constraintSymfony\Component\Validator\Constraint
propertyMetadata`ApiPlatform\Metadata\ApiProperty`

Returns

bool

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop