core icon indicating copy to clipboard operation
core copied to clipboard

feature(symfony): Add CSS Color Schema Restriction for Property Validation

Open SebLevDev opened this issue 7 months ago • 0 comments

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 avatar Jun 13 '25 14:06 SebLevDev