Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Answer the question
In order to leave comments, you need to log in
Each validator is specified separately (I did not see the built-in strip_tags validator in the documentation , so I replaced it with a function):
return [
[['title', 'preview'], 'string', 'max' => 255],
[['title', 'preview'], 'trim'],
[['title', 'preview'], 'filter', 'filter' =>
function ($value) {
return strip_tags($value);
}
],
[['title', 'preview'], 'required'],
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question