[eluser]cideveloper[/eluser]
[quote author="ReyPM" date="1307425639"]Ohh you're right thanks I miss this part but I've another problem related to this.
1) How you build a rule for this:
Code:
($value < 40 || $value > 100 || $value != 0)
2) How do I check that is a integer and also that is positive value? This is right:
Code:
$this->validation->set_rules("hp_motor", "HP Motor", "required|numeric|integer|min_length[40]|max_length[300]");
[/quote]
1) Look at is_natural_no_zero, greater_than and less_than
2) Completely wrong from what I can see. No need to do numeric and integer. min and max length deal with strings. greater_than and less_than deal with numbers.
go through the Rule Reference. It has all the options you require.