Validation of Street and Street Continued fields in Canadian Address is too restrictive. Canadian street address can have a suffix after the building number like "123A Main St" or "123 1/2 Main St", but current validation function does not allow any characters other than letters and digits.

Validation of Canadian Address should allow entry of "/" character in "Street" and "Street Continued" fields.

Comments

rconstantine’s picture

okay. I can add that to the validation. are there any other characters? i think i'll add country-specific validation routines to the country's module, then call it from the main module. i'll get to this next Wednesday (my designated module maintenance day).

thanks for the heads-up.

sshvetsov’s picture

I think it's a good idea to make validation country specific. There are no other characters that I can think of at the moment. Perhaps some special characters in the street name itself, like "-". There's also a matter of French letters like "È", will those be allowed?

rconstantine’s picture

I think i have a work-around for language-specific validation. Using the setLocale function, when validation begins for a specific country, I can store the current locale; switch to one that the country's language needs; validate; if invalid, try another locale defined for that country; validate; if invalid... repeat for each language official to that country until valid, or no locales worked; if no locales worked, there should be a real error in the input; after validation completes, reset the locale to the saved value. I'll implement this as a hook, so that I'll be able to check for the existence of the country-specific validation function and handle missing ones gracefully. However, it will be on the country plugin developer to validate correctly. Fortunately for you, I'm handling Canada. I probably won't add other countries myself, but will respond to suggestions in extending support for the creation of support for other countries.

On my next module update day, I do need to address some issues with my cck_fullname module and my accounttypes module, so cck_address may have to be put off for one week if I don't get the others fixed quickly enough.

Thanks for your patience.

rconstantine’s picture

I just finished designing the new hook. It seems to work with U.S. addresses. I'll do the Canadian next, then upload.

rconstantine’s picture

Status: Active » Fixed

Look for a new dev release today.

Anonymous’s picture

Status: Fixed » Closed (fixed)