b-b-a / bba-power

1 stars 0 forks source link

Number Main validation (spaces) #103

Closed paulmallett closed 12 years ago

paulmallett commented 12 years ago

"Number Main" (MPAN13) now displays with spaces, which is good (e.g. 22 0001 2380 133).

However, I want to ensure that the number is not stored with spaces. So, either validadtion on this field stops spaces (or hypens) being entered, of the system removes spaces/hypens before storing the value.

shaunfreeman commented 12 years ago

The system already strips the spaces out, no MPAN13 is stored with spaces in the database. I will add hyphens to the striping process as well.

I have done this at the model level and not the form level as adding a filter to the form would display the number without the spaces (i.e. all one number) in the form, and I thought you would prefer to have the number read with spaces in the form as well as the table/display areas. If this is not a requirement then I can add the filter to the form and display the number as one long number in the form.