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

Allow common non-numeric characters in phone numbers

    XMLWordPrintable

Details

    • Story
    • Status: Approved
    • TBD
    • Resolution: Fixed
    • None
    • OpenMRS 2.2
    • None
    • None
    • 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.

      Gliffy Diagrams

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: