Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tjphippen's avatar

Weird Date Format Validation Issue

I'm using "date_format:m/y" to validate a credit card expiration date. if I send "02/19" I get "The expiration does not match the format m/y." BUT if I send any other month, e.g: 01, 03, 04 etc. it validates no problem. It's just 02 that has this issue.

Any Ideas?

0 likes
1 reply

Please or to participate in this conversation.