Slug validation rule fails in default.yaml - bug?

                    folder:
                      type: text
                      label: PLUGIN_ADMIN.FOLDER_NAME
                      validate:
#                        rule: slug
                        pattern: '[a-zA-Zа-яA-Я0-9_\-]+'
                        min: 1
                        max: 200

rule: slug doesn’t appear to be being parsed. If I copy pattern etc from the top of the file, it works as expected. If I inherit default.yaml in theme blueprints no validation will take place.

Is this a bug?

Cheers, Nick

You have to define the rule in the form: https://learn.getgrav.org/forms/blueprints/advanced-features#defining-validation-rules

So not a bug :slight_smile:

But the rule doesn’t work…

Hmm… try this to reference it in the field:

            validate:
                required: true
                rule: slug

If this works, we have a typo in the docs.

Thanks I will try soon