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

Ricardo's avatar

Simple date validation, not working!!

Hi there,

This is a very simple issue, but I can't get it working...

Any clues?

// rule:
'birthday'  => 'required|date|date_format:d/m/Y|after:01/01/1990',

// input:
27/10/2012

// Get
Invalid format
0 likes
2 replies
Ricardo's avatar

@thomassjogren you are totally right, thank you.

date uses strtotime

data_format uses date_parse_from_format

Can't be use both!

1 like

Please or to participate in this conversation.