COmanage Registry supports the concept of data normalization. For example, if a petitioner enters the text " los angeles " into a field, normalization could correct that to "Los Angeles".

As of v0.9.4, normalization is enabled by default. Normalization is enabled on a per-CO basis, via CO >> Configuration >> CO Settings. Once enabled, normalization currently happens transparently, without meaningful user feedback (CO-282). After a supported form is submitted, normalizations are run before data is written to the database.

Currently, the following normalizations are supported:

Normalization

Description

mixCase

Make the first character in each word upper case and the remaining characters lower case.
(warning) For multibyte (non-ASCII7) support, PHP must be built with --enable-mbstring.

punctuationToSpaceReplace all non-alphanumeric characters with whitespace.

trimWhitespace

Leading and trailing whitespace is removed.

(warning) All defined normalizations are always run on the relevant data (models), when normalization is enabled for the CO.

Model / Field

mixCase

punctuationToSpace

trimWhitespace

Address.line1

(tick)

 

(tick)

Address.line2

(tick)

 

(tick)

Address.locality

(tick)

 

(tick)

Address.state

(tick) (if string is at least 4 characters)

 

(tick)

Address.postal_code

 

 

(tick)

Address.country

(tick) (if string is at least 4 characters)

 

(tick)

CoPersonRole.title

(tick)

 

(tick)

CoPersonRole.o

(tick)

 

(tick)

CoPersonRole.ou

(tick)

 

(tick)

CoPersonRole extended attributes of type VARCHAR

 

 

(tick)

EmailAddress.mail

 

 

(tick)

Identifier.identifier

 

 

(tick)

Name.honorific

 

 

(tick)

Name.given

 

 

(tick)

Name.middle

 

 

(tick)

Name.family

 

 

(tick)

Name.suffix

 

 

(tick)

TelephoneNumber.country_code (tick)(tick)
TelephoneNumber.area_code (tick)(tick)

TelephoneNumber.number

 

(tick)

(tick)

TelephoneNumber.extension (tick)(tick)
Url.url  (tick) as of v3.1.0

Additional normalizations can be added by writing a custom plugin. When adding new normalizations, note that NormalizationBehavior should run before Changelog Behavior.

  • No labels