Plugin Development


The Defin­i­tive Guide to Val­i­da­tion in Craft

In the 5 part series linked below, Stephen Lewis from Experience provides a nice overview and deep dive of Validation in Craft and how it relates to the underlying validation in Yii.

Part 1: Foundations
If you’re working on a Craft plugin that accepts user input, chances are you’ll want to validate that data...

Part 2: AttributeTypes
This instalment is all about Craft’s AttributeTypes: what they are, what they do, and which ones are available.

Part 3: Attribute Rules
This instalment is all about attribute rules: what they are, how they affect validation, and which ones are available.

Part 4: Hidden Validator Settings
This instalment is all about “hidden” validator settings, which aren’t accessible via the usual Craft attribute rules.

Part 5: Custom Validators
This instalment is all about implementing your own custom validators.

Martini Icon
Next Page

Level up in Craft CMS with practical examples, snippets, and patterns.
Craft The Planet emails are sent out several times a week.