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

vandyczech's avatar

Check timestamp

I have timestamp for example purchased_at. Its the same attributes like created_at or updated_at. When I want update this timestamp via form input its neccessary validate the date which user filled. Users can not fill other than the right date format and date must be valid of course. For example the function check from DateTime allows fill the day 32, which is wrong, maximum of days in month is 31.

Some idea?

0 likes
1 reply

Please or to participate in this conversation.