Skip to content

Conversation

@SebLevDev
Copy link
Contributor

Description

This PR introduces the PropertySchemaCssColorRestriction class, which generates a regular expression (pattern) for validating CSS color values in API Platform property schemas, based on the Symfony CssColor constraint.

Technical Details

Supports multiple CSS color formats (hex, rgb, rgba, hsl, hsla, named colors, etc.).
Dynamically builds a single regex pattern combining all allowed formats, suitable for OpenAPI/JSON Schema documentation.

@SebLevDev SebLevDev closed this Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant