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.

Cus­tom Mul­ti-Envi­ron­ment Con­fig and Exam­ples of How to Cus­tomize Each Environment

By default, when you setup a [multi-environment config](http://buildwithcraft.com/docs/multi-environment-configs), Craft compares the key in your multi-environment config array to the PHP `$_SERVER['SERVER_NAME']` variable to test which environment matches. If the key in your array is contained within the `$_SERVER['SERVER_NAME']` variable, Craft considers the option a match. Read More »

Ben Parizek

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.