Tailor / Slug not reflecting yaml

i created blueprint and using disable method for slug

slug:
        hidden: true
        validation: 
            - false

but,

EntryRecord::inSection... create($data);

still ends with flash message from validation about slug is required :confused:

Short answer that “fixes” this strange behaviour is using new EntryRecord…

$entry = new EntryRecord::inSection...
$entry->slug ...
$entry->save();

I see, it looks like the rules are set by defineFormFields() so it only applies in the Tailor backend controller.

We’ll need to refactor this so it happens when the model initializes instead. For now, it is safe to set the slug to bypass it.

1 Like