Skip to content

Conversation

@leek
Copy link

@leek leek commented Nov 3, 2025

This pull request adds support for the regex validation rule to several field types and ensures it is properly handled throughout the codebase. The changes update both the validation rule definitions and the field type configurations, as well as the associated tests and type hints.

Validation Rule Support

  • Added REGEX and NOT_REGEX to the list of validation rules that accept a single parameter in the ValidationRule enum (src/Enums/ValidationRule.php).

Field Type Configuration

  • Enabled the REGEX validation rule for the following field types: ColorPickerFieldType, LinkFieldType, MarkdownEditorFieldType, RichEditorFieldType, TextFieldType, and TextareaFieldType (src/FieldTypeSystem/Definitions/*.php). [1] [2] [3] [4] [5] [6]

Testing Updates

  • Updated the validation rules dataset to include regex as an allowed rule for the affected field types and added new test cases for color-picker, textarea, and markdown-editor field types (tests/Datasets/ValidationRulesDataset.php). [1] [2]

Type Hinting

  • Fixed type hints for navigationIcon properties in CustomFieldsManagementPage and PostResource to use fully qualified \BackedEnum (src/Filament/Management/Pages/CustomFieldsManagementPage.php, tests/Fixtures/Resources/Posts/PostResource.php). [1] [2]
    [Copilot is generating a summary...]

@leek leek force-pushed the leek/regex-validator branch from 9ce2d8b to 12e3573 Compare November 3, 2025 21:26
@leek leek force-pushed the leek/regex-validator branch from f2c98c0 to 96201c2 Compare November 3, 2025 21:34
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