Custom Page Type Validator

Permalink
using the following link
http://documentation.concrete5.org/developers/working-with-pages/cr...
I would like to validate a Custom Attribute control instead of the core datetime property but not sure how i get this

$controls = Control::getList($this->type);
        foreach($controls as $control) {
            if ($control instanceof DateTimeCorePageProperty) {


was thinking of using getPageTypeComposerFormLayoutSetControlCustomLabel() but get errors. Can anyone help please.

Responsive
 
Responsive replied on at Permalink Reply
Responsive
can anyone help on this please
hutman replied on at Permalink Reply
hutman
You would need to add a Use statement at the top for the type of attribute you are working with and change that line to check if the current page attribute is the same type as the one you want to validate and do your logic below.