I notice client side validation only happens on my text fields and not on the link fields (URL).
I am using the link module http://drupal.org/project/link and I absolutely need this because it checks for external urls, etc but I can't get clientside to check on keyup.

I even tried adding my own regex field validation (using field_validation module) to this field - no luck either.

I notice it doesn't work when I have this as my field type also.
http://drupal.org/project/email
http://drupal.org/project/phone

Any ideas why?

Comments

attiks’s picture

Version: 7.x-1.31 » 7.x-1.x-dev
Category: support » feature
Priority: Major » Normal

There's no integration for these 3 fields, we do support http://drupal.org/project/elements. Elements will probably solve the problem for email and phone, but for URL it's one field only, it doesn't add an extra field for title.

Marking this as a feature request so we can add support in the future.

jumoke’s picture

Thanks attiks. Kudos for all the great work on this amazing module!

I inspected element and notice the browser renders link fields as type="text" - so shouldn't this work without any extras? What does the title have to do with?

jumoke’s picture

Also is there plan for this to support Field_Validation 2.x? Currently it supports 1.x http://drupal.org/project/field_validation

Thank you.

attiks’s picture

See #1535756: Support Field Validation 2.x

The field are rendered as a text input, but for drupal they are different, they have names like email, phonefield and linkfield so they have to be treated differently.

jumoke’s picture

Can anyone please suggest an option for acheiving clientside validation for my url/link fields for now please?

attiks’s picture

Assigned: Unassigned » jelle_s
jelle_s’s picture

fixed in the latest dev version. For phone fields you will need the patch in #1554396: Follow Drupal Standards in phone_field_widget_form()

jumoke’s picture

Awesome!! Thank you :)

attiks’s picture

Status: Active » Postponed
jelle_s’s picture

Status: Postponed » Fixed

Patch was commited to latest dev of the phone module.

jelle_s’s picture

Assigned: jelle_s » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.