Guides
Tutorials
Class PropertySchemaLengthRestrictions.
class ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaLengthRestriction implements `<a href="/docs/reference/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface">ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRestrictionMetadataInterface</a>`
{
public create(Symfony\Component\Validator\Constraints\Length $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): array
public supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): bool
}class ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaLengthRestriction implements `<a href="/docs/reference/Symfony/Validator/Metadata/Property/Restriction/PropertySchemaRestrictionMetadataInterface">ApiPlatform\Symfony\Validator\Metadata\Property\Restriction\PropertySchemaRestrictionMetadataInterface</a>`
{
public create(Symfony\Component\Validator\Constraints\Length $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): array
public supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): bool
}Creates json schema restrictions based on the validation constraints.
public create(Symfony\Component\Validator\Constraints\Length $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): arraypublic create(Symfony\Component\Validator\Constraints\Length $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): array| constraint | Symfony\Component\Validator\Constraints\Length | |
| propertyMetadata | ApiPlatform\Metadata\ApiProperty |
array
Is the constraint supported by the schema restriction?
public supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): boolpublic supports(Symfony\Component\Validator\Constraint $constraint, ApiPlatform\Metadata\ApiProperty $propertyMetadata): bool| constraint | Symfony\Component\Validator\Constraint | |
| propertyMetadata | ApiPlatform\Metadata\ApiProperty |
bool