• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is this validation class limitation?

#1
[eluser]webbymonk[/eluser]
Hey Guys,

I have tried to set rules for validation, but i have an array of same-name field
Code:
<input type="text" name="fieldname[]" />
<input type="text" name="fieldname[]" />
<input type="text" name="fieldname[]" />
<input type="text" name="fieldname[]" />

i tried to set rules in the validation
Code:
$rules['fieldname'][] = 'required'

and the result gave the error
Code:
A PHP Error was encountered

Severity: Notice

Message: Array to string conversion

Filename: libraries/Validation.php

Line Number: 195

#2
[eluser]xwero[/eluser]
short answer : yes Smile

There are third party modifications that overcome this restriction. Or you can name the fields individually.

#3
[eluser]drewbee[/eluser]
Try this thread. It is exactly what you are looking for.

http://ellislab.com/forums/viewthread/73012/


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.