Welcome Guest, Not a member yet? Register   Sign In
using form arrays and the validation library
#1

[eluser]Unknown[/eluser]
Is there a built in method to use the validation library and form arrays?

For example I would like to have a form like:
Code:
<form>
   <input type="text" name="nickname[]" value="<?php echo $this->validation->nickname(0);?>" />
   <input type="text" name="nickname[]" value="<?php echo $this->validation->nickname(1);?>" />
   <input type="text" name="nickname[]" value="<?php echo $this->validation->nickname(2);?>" />
   <input type="text" name="nickname[]" value="<?php echo $this->validation->nickname(3);?>" />
</form>

then in the controller run something like:
Code:
$rules['nickname']     = "trim|required|min_length[5]";

$fields['nickname']    = "You most Provide a nickname that has at least 5 letters in it.";

Is this currently built in or being planned or do I have to extend the validation library to do this?




Theme © iAndrew 2016 - Forum software by © MyBB