Validation tripped up by leading zero

Grantovich - July 3, 2008 - 19:41
Project:Phone (CCK)
Version:5.x-2.11
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If the first character entered in a Phone field is a zero, and the entire input has at least the required number of digits, it passes validation with no error messages and the string "() -" is stored in the field. This happens even when the field is Required.

Examples:
100-000-0000 is not accepted, but 011-111-1111 is accepted
000-000-000 is not accepted, but 000-000-0000 is accepted, as well as 000-000-0000123456789
111111111111111111111111 is not accepted, but 0111111111111111111111111 is accepted

I observed this behavior using the North American phone field.

 
 

Drupal is a registered trademark of Dries Buytaert.