Welcome Guest, Not a member yet? Register   Sign In
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/




Theme © iAndrew 2016 - Forum software by © MyBB