Skip to content

Conversation

@satrun77
Copy link
Collaborator

@satrun77 satrun77 commented Oct 24, 2025

Unit tests pass. Not tested yet, but we are in the process of testing this in the coming weeks

@satrun77 satrun77 force-pushed the pulls/cms6-support branch 2 times, most recently from 92f94e1 to df4fc12 Compare October 24, 2025 04:38
{
parent::__construct($name, $options);
// disable date validation to allow for empty value
self::config()->set('field_validators', []);
Copy link

@GuySartorelli GuySartorelli Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't alter config at runtime if you can avoid it. Use this instead:

private static array $field_validators = [
    // Remove parent validator
    DatetimeFieldValidator::class => null,
];

Better would be to introduce new appropriate validation but I'll let someone who's doing a real review decide if they care about that - I'm just doing a driveby.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙏 I was trying to remove the validation or change it but could not figure out how!

@satrun77 satrun77 marked this pull request as ready for review October 31, 2025 00:28
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.

2 participants