Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added autoformatting

  • Loading branch information...
commit aa3c6fdc81a107b6e141582c9b7c62b65361e461 1 parent 5a66f44
@jordanclark authored
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 )>
Please sign in to comment.
Something went wrong with that request. Please try again.