Skip to content
Browse files

Added autoformatting

  • Loading branch information...
1 parent 5a66f44 commit aa3c6fdc81a107b6e141582c9b7c62b65361e461 @jordanclark committed Feb 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 rules/postalcode.cfm
View
3 rules/postalcode.cfm
@@ -3,6 +3,9 @@
<cfif arguments.autoFix>
<cfset arguments.value = reReplaceNoCase( arguments.value, "[^a-z0-9#arguments.postalDivider#]", "", "all" )>
+ <cfif arguments.autoFormat>
+ <cfset arguments.value = uCase( left( arguments.value, 3 ) & arguments.postalDivider & right( arguments.value, 3 ) )>
+ </cfif>
</cfif>
<cfif NOT reFindNoCase( "^[a-ceghj-npr-tvxy][0-9][a-ceghj-npr-tv-z]#arguments.postalDivider#[0-9][a-ceghj-npr-tv-z][0-9]$", arguments.value )>

0 comments on commit aa3c6fd

Please sign in to comment.
Something went wrong with that request. Please try again.