Bd Validation Rule

Add a new validation rule to better-data — implement the Rule interface (NOT "RuleInterface"; the actual interface in src/Validation/Rule.php is named Rule), live in src/Validation/Rule/, and follow the canonical contract — check(mixed, string, DataObject) returns null on pass or a short error string on fail; rules other than Required treat null as skip so nullable fields don't false- positive. Each rule is also a PHP attribute (TARGET_PARAMETER | TARGET_PROPERTY | IS_REPEATABLE), is final readonly, holds zero business logic outside check(), and surfaces in JSON Schema via RestSchemaBuilder::applyRuleAttribute when relevant. Use when introducing a rule that isn't in src/Validation/Rule/ (Email, Url, Uuid, Min, Max, MinLength, MaxLength, Regex, OneOf, Required, Callback). Triggers on creating a class implementing Rule, adding a new

Lonsdale201 Updated

File contents

Lonsdale201/wp-agent-skills/tree/main/better-data/bd-validation-rule commit 4a54c63ad9

Frequently asked questions

npx skillmds@latest add lonsdale201/bd-validation-rule