Closed (fixed)
Project:
Fullname field for CCK
Version:
5.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Mar 2007 at 15:47 UTC
Updated:
25 Jul 2007 at 16:09 UTC
The Fullname field looks good, but when I try and enter a name with anything other than alpha characters (eg an apostrophe or a hyphen) it's rejected. So I can't enter my good friends Gavin O'Reilly and Mary-Jane Osborne-White :(
Comments
Comment #1
rconstantine commentedOoo, good catch. I obviously failed to take those into account. I'll adjust the regular expressions as soon as I get a chance.
While we're at it, are there any others you can think of? It seems that PHP doesn't currently support the simple regex for international letters (in unicode). I can't remember what the regex would be, but it was really simple and allowed all of the accent-marked letters, as well as Chinese and other characters, all in one simple phrase. Perl does have support for it, just not PHP's implementation of the perl-style regex's.
So for now, I'm only supporting the English alphabet. Eventually, I'd like to provide a drop down to select a country of origin, which will select from a list of possible regex's for validation. Patches are welcome.
But I'll add the hyphen and apostrophe as soon as I can. Good catch.
Comment #2
adam_b commentedSorry, I'm a humble integrator/manager rather than a developer... regexp's give me a splitting headache. But my initial reaction would be to ask why control the content entry at all? It's not done on normal text fields, so I'm not sure what it adds here.
And a country-based drop-down menu which controls allowable exceptions is asking for trouble - what about my other good friends Eva Janaček and Nhãn Đuc Nguyen who live in London but insist on using the correct Czech/Vietnamese accents for their names?
Comment #3
rconstantine commentedUpdate: I had hoped to get to this today. Should be able to get to this by next Wednesday.
Comment #4
rconstantine commentedFixed. Get the dev release dated today or later.
Comment #5
rconstantine commentedComment #6
(not verified) commentedComment #7
csc4 commentedThe dev version has fixed the hyphenated surname problem but validation no longer says 'first name' required - it just says 'field is required'