[buddypress-trac] [BuddyPress Trac] #6133: Digit limit and mask for number xprofile field

buddypress-trac noreply at wordpress.org
Sat Jan 24 11:42:52 UTC 2015


#6133: Digit limit and mask for number xprofile field
-------------------------+-----------------------------
 Reporter:  sooskriszta  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  XProfile     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+-----------------------------

Comment (by sooskriszta):

 Here's how I am thinking about it:

 There are some reserved characters for the mask: 0, # and *
 {{{
 0 forced a certain number of digits by padding the number with non-
 significant zeroes.
 # represents a digit
 * represents digits (any number of digits)
 }}}

 Usage
 {{{
 Number entered: 5
 Mask: 00-00
 Number displayed: 00-05
 Mask: ##-##
 Number displayed: N.A. (Error! 4 digit entry required)
 Mask: **-**
 Number displayed: 5

 Number entered: 5386
 Mask: 000/0
 Number displayed: 538/6
 Mask: ###/#
 Number displayed: 538/6
 Mask: ***/*
 Number displayed: 5386

 Number entered: 6507232766
 Mask: 000-000-0000
 Number displayed: 650-723-2766
 Mask: ###-###-####
 Number displayed: 650-723-2766
 Mask: *-###-####
 Number displayed: 650-723-2766

 Number entered: 16507232766
 Mask: +0-000-000-0000
 Number displayed: +1-650-723-2766
 Mask: +#-###-###-####
 Number displayed: +1-650-723-2766
 Mask: +*-###-###-####
 Number displayed: +1-650-723-2766
 Mask: +*-###-###-*
 Number displayed: 16507232766
 Mask: ###-###-####
 Number displayed: N.A. (Error! 10 digit entry required)

 Number entered: 446507232766
 Mask: +*-###-###-####
 Number displayed: +44-650-723-2766
 Mask: +##-###-###-####
 Number displayed: N.A. (Error! 10 digit entry required)
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6133#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list