Model validation not run when using EntriesService saveEntry method Currently i have to validate my model before saving because of some custom validation rules setted on the model which won't run when using the EntriesService saveEntry method.

This causes a two step validation when errors arise, first you get the custom validation errors and after that if there is still something wrong you get the "base" validation errors.

Is this a normal behavior?

$model-&gt;validate();


After that i am saving the model like so:

$result = craft()-&gt;entries-&gt;saveEntry($model);


Custom rules on model:

public function rules()
{
    $rules = parent::rules();
    $rules[] = ['state', 'validateState'];
    $rules[] = ['vacancyId', 'validateId'];
    //$rules[] = ['vacancyId', 'numerical', 'unique' =&gt; false];
    $rules[] = ['office', 'validateOffice'];
    $rules[] = ['sector', 'validateSector'];

    return $rules;
}


Why are the custom validation rules not evaluated on the saveEntry method?
It's normal behavior... EntriesService-&gt;saveEntry() never calls validate() on the model directly, but does call validate() on the EntryRecord and if there are errors, add it back to the model and return.

So if you want to run custom validation rules before calling saveEntry you'll need to do that yourself and respond accordingly.