Download & Extend

URL not validated for multiple values

Project:Link
Version:6.x-2.9
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)
Issue tags:field validation

Issue Summary

Very helpful module (took me forever to find it though!).

Just installed it on a fresh Drupal install. The problem is that it will not validate URLs for multiple values. It will validate the first URL, but not any subsequent URLs.

Thoughts...?

Thanks much!!!

Comments

#1

Status:active» postponed (maintainer needs more info)

What do you mean, it will not validate URLs for multiple values. What values are you entering, and how is it behaving? CCK handles multiple-value-fields, and this is the first I"ve heard of it.

Feel free if you would like to make a screenshot of the form with the error message if you think it would help.

#2

Sorry for the lack of clarity...

I have a Link CCK field set up to have 2 values for a node type. If an incomplete URL is entered into the first line when creating that node type, the correct error message pops up telling me it's not in a correct URL format. However if an incomplete URL is entered into the 2nd URL value (for instance just "google" or "www.google"), it is allowed to be saved as-is, no error or validation method.

Does that make sense? I have not done extensive testing, ie more than 2 values etc. Would that be helpful? Thanks!!

#3

subscribing

I found the same issue. Having a link field with multiple values, only the 1st URL is validated.

#4

Well, that sounds pretty odd.

Thanks for pointing it out.

#5

Same problem faced even with single value, there might be some problem in 'link_validate_url' function.

In field setting, just don't set it as required to re-generate the problem.

Entered 'asdf' in link URL value but validation didn't work.

Then changing link URL value to 'asdf asdf', notice the space in value, generates the expected 'Not a valid URL' error.

* Field not-required
* Number of values: Any value more than 1, also Unlimited
* Validate URL enabled
* Optional URL disabled
* Link Title: Optional Title
* Allow user-entered tokens disabled
* Link Target: Default(no target attribute)
* Rel Attribute, Additional CSS Class, and Link 'title' Attribute blank

Hope above details will work to track the problem.

#6

Status:postponed (maintainer needs more info)» closed (duplicate)

Dear followers of this issue: please read the project page info of link module for further validation issues. There is already an issue to collect and discuss all possible validation scenarios in general. That's why I will mark this one here as duplicate. I need all concentration inside the ONE and only discussion to move forward. After a D7 implementation we will provide a D6 backport.

Explanation: There are too many corner cases and validation wishes of users to implement them all serially one after the other. We would have a 40 lines cluttered settings form for validation methods, conflicting with each other randomly. I think, the right way is to find a maybe more complex but all embracing new configuration method, which lets the admin better decide, how and when to validate the url. Including a good description which helps to set it up. This will surely lead to a new branch