Base fieldtype validation working with model validation? How can you ensure that the base fieldtype validation (required etc) and error messages are still applied when validating $value via the validate($value) function??

Validate method in fieldtype class:

public function validate($value)
{
    if(is_array($value) &amp;&amp; $value['type'] != '')
    {
        $linkModel = $this-&gt;_valuetToModel($value);
        $validated = $linkModel-&gt;validate();
        return $validated ? true : $linkModel-&gt;getAllErrors();
    }
    return true;
}


Validate method of custom model that the fieldtype populates and returns to the template:

public function validate($attributes = null, $clearErrors = true)
{
    switch($this-&gt;type)
    {
        case('email'):
            if( !filter_var($this-&gt;value, FILTER_VALIDATE_EMAIL) )
            {
                $this-&gt;addError('value', Craft::t('Please enter a valid email address.'));
            }
            break;

        case('tel'):
            $regexp = '/^[0-9+\(\)#\.\s\/ext-]+$/';
            if(!filter_var($this-&gt;value, FILTER_VALIDATE_REGEXP, array('options' =&gt; array('regexp' =&gt; $regexp))))
            {
                $this-&gt;addError('value', Craft::t('Please enter a valid telephone.'));
            }
            break;

        case('custom'):
            if(!filter_var($this-&gt;value, FILTER_VALIDATE_URL))
            {
                $this-&gt;addError('value', Craft::t('Please enter a valid url.'));
            }
            break;

        case('entry'):
            if($this-&gt;value == '')
            {
                $this-&gt;addError('value', Craft::t('Please select an entry.'));
            }
            break;

        case('asset'):
            if($this-&gt;value == '')
            {
                $this-&gt;addError('value', Craft::t('Please select an asset.'));
            }
            break;

        case('category'):
            if($this-&gt;value == '')
            {
                $this-&gt;addError('value', Craft::t('Please select a category.'));
            }
            break;
        // default:
        //     Craft::dd(parent::validate($attributes, null));
        //     $this-&gt;addError('value', Craft::t('Please select a sdfasdfsd.'));
        //     break;
    }

    return !$this-&gt;hasErrors();
}
Completely untested and this whole pattern feels hacky to me, but something like this should work:

From your field type:

public function validate($value)
{
    if(is_array($value) &amp;&amp; $value['type'] != '')
    {
        // Validate the field type.
        $errors = parent::validate($value);

        if (!is_array($errors))
        {
            $errors = array();
        }

        $linkModel = $this-&gt;_valuetToModel($value);

        // Validate the model.
        $validated = $linkModel-&gt;validate();

        return $validated &amp;&amp; empty($errors) ? true : array_merge($linkModel-&gt;getAllErrors(), $errors);
    }

    return true;
}


From your model:

public function validate($attributes = null, $clearErrors = true)
{
    switch($this-&gt;type)
    {
        case('email'):
            if( !filter_var($this-&gt;value, FILTER_VALIDATE_EMAIL) )
            {
                $this-&gt;addError('value', Craft::t('Please enter a valid email address.'));
            }
            break;

        ....

    }

    return !$this-&gt;hasErrors();
}