Reputation: 37
I'm using Kohana framework for my project development, I need to introduce new rules Suppose I have original_price and discount_price fields, for this discount_price must be always always less than or equal to original_price.
For this scenario, how to write new rule(method).
Upvotes: 1
Views: 224
Reputation: 1689
In your Kohana framework,you will find validation.php
file,in that write a appropriate validation function.Suppose you want to test some length of a text field then write relevant function here and call that function in your controller class using add_rules().I hope you got the answer.
Upvotes: 2
Reputation: 14661
Use v3.2 and check this page out: http://docs.kohanaphp.com/libraries/validation
Upvotes: 0