Answer the question
In order to leave comments, you need to log in
What is wrong with date validation in Yii2?
Please help with date validation. I didn’t notice such a problem before, but now we get a valid answer for a non-valid date (although of course there is a controversial point with the invalid date).
Essence:
public function rules() {
return [ ['published_at', 'date', 'format' => 'php:d.m.Y']];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question