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).
In your Kohana framework,you will find
validation.phpfile,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.