Uploaded image for project: 'Reference Application'
  1. Reference Application
  2. RA-593

Allow common non-numeric characters in phone numbers

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Accepted
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 2.2
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Undetermined

      Description

      Currently, only numeric responses are allowed for phone numbers. If the user enters spaces, hyphens, parentheses, or a leading plus sign, the phone number is considered invalid.

      Without trying to over-design the phone number validation, the default format for phone numbers should be more like:

      /^\+?[\d \-\(\)]+$/
      

      That is, an optional leading "+" followed by any combination of numbers, spaces, hyphens, or parentheses.

      Dev Notes

      I think this needs to be fixed in https://github.com/openmrs/openmrs-module-referencemetadata/blob/master/api/src/main/resources/Reference_Application_Person_Attribute_Types-1.zip by modifying the Phone Number person attribute type on mdsbuilder.openmrs.org, and creating a new version of this package.

      Better yet would be removing this MDS package entirely, and reimplementing it using Metadata Deploy.

        Attachments

          Activity

            People

            Assignee:
            maurya Sri Maurya Kummamuru
            Reporter:
            burke Burke Mamlin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: