The inpu field only alows 250 characters. I usually have over 250 ID numbers to validate. Need to accept more characters for specific values.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

svendecabooter’s picture

This is caused by the database schema field length.
This could be made larger, but I suppose then someone will come up with a use case where even more numbers need to be validated.
Perhaps it would make more sense in your case to write a custom validation rule? Perhaps you could more easily get the ID numbers from the DB, an external file, etc... or generate them via PHP? That might be easier than typing them all in?
This supposes you know a bit of PHP though of course...

Liam Morland’s picture

Title: Max length of specific values » Allow longer validator data
Version: 6.x-1.4 » 7.x-1.x-dev

Is there any need to limit the data field to 255 characters? Why not use text instead of varchar?

Liam Morland’s picture

Marking #1418780: Longer RegEx Validation Rules as a duplicate of this.

BrianLP’s picture

In my case, I can't generate them with php and I haven't found another way of validation. Perhaps someone has an idea...

I'd like to use the webform for mailing response landing pages where the user enters his personal ID to see the content. Usually 200-500 IDs.

They are the customer IDs from an external filemaker database (selected on customer attributes). They have no specific pattern other than consisting 5 or 6 digits. The best (and only) way I can think of is to paste the IDs into the validation field when creating the page. My database puts them into the clipboard, separated with commas.

Liam Morland’s picture

@papalapapp The suggestion in #1 is to create a custom module which uses the hooks provided by Webform Validation. That would allow you to put the IDs into the code or wherever is convenient for you.

Liam Morland’s picture

Status: Active » Fixed
FileSize
1.26 KB

Fixed in ca095b7f87b88f54fbab97bcd4ab487ae1f5baa6

Liam Morland’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)
BrianLP’s picture

Thank you! Do I see it right that this is applied to the 7.x-1.x-dev (2013-Jan-22) already?

Liam Morland’s picture

Yes, it is in 7.x-1.x-dev now.

Mentor.37’s picture

I installed last 7.x-1.2 module but i can not insert more then 255 char in data field.
What can I do? I'm trying to insert a list of emails to ban in words blacklist.

Liam Morland’s picture

If you installed the development version of this module after rule negation had been added but before the data field was extended, then the update hook will not have changed the field type.

Please check your database to see if the data field has become of SQL type text instead of varchar(255). If not, manually change the field type. Use a tool like phpMyAdmin to do this.

Mentor.37’s picture

I have not installed dev version.
I'm on sql database and in database data field is not varchar(255) but is text. I can manually add in database more then 255 char but i can not do this in drupal.
Can you help me?

Liam Morland’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Fixed

Turns out there was still a #maxlength on the input element, now removed.

http://drupalcode.org/project/webform_validation.git/commitdiff/8e36f8f

Liam Morland’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

Include both patches when porting.

BrianLP’s picture

Works perfectly. Thanks!
(This makes things so much easier. No more regex and blacklists, only a precise list of allowed numbers.)

Liam Morland’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Patch (to be ported) » Closed (fixed)

Drupal 6 is no longer supported.