RuleRegistry
Corex\Forms\Validation\RuleRegistry · class · Forms layer
Maps a rule name to its Rule instance and parses a rule spec (“max:80”) into a name and its parameters. Built-ins cover the complete flow contract while extensions may register additional rules; unknown names are never accepted.
Public API
Section titled “Public API”__construct()
Section titled “__construct()”register(string $name, Rule $rule): void
Section titled “register(string $name, Rule $rule): void”keys(): array
Section titled “keys(): array”has(string $name): bool
Section titled “has(string $name): bool”get(string $name): Rule
Section titled “get(string $name): Rule”parse(string $spec): array
Section titled “parse(string $spec): array”Split “name:param1,param2” into its name and parameter list. A pattern: is the exception: everything after the colon is the expression, and pattern:^\d{2,4}$ split on its comma is two halves of one.