New version available here, a post about this issue is located here.
This is a module with rules you'd like when validating forms in kohana. It is the same concept as the valid::-rules.
For example:
$post->add_rules('some_field', 'required', 'digit', 'formrules::positive');
This will require "some_field" to be a digit (whole number) above zero.
For now, positive is actually the only rule in this module. So it is more like the foundation of a module. :) More rules will follow.
Hashes: #kohana form rules module #kohana module #kohana #form validation #php
Excellent! Its should be named formrules::positive :)
ReplyDeleteAbsolutely. aboveZero() is now positive()
ReplyDeleteThanks. :)