Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4539

Object validation should enforce maximum length based on column length constraints in the DB

    XMLWordPrintable

    Details

    • Complexity:
      Low

      Description

      Fields or columns that are of character datatype at the database layer have a set number that must not be exceeded for-example char(50) . And we don't mind to check what would happen in-case the user entered more characters in a given field, at the database layer this is alright but it will end up into spilling stack traces into the UI in-case it happens.

      See for-example: the failure screenshot at http://snag.gy/OZyo2.jpg and the stack-trace generated at: http://pastebin.com/ATR2RVWZ

      In this issue you are to go through all fields stored as characters and check for the number set for each at the database layer and then validate if the user enters more characters so that you can instead through some good informative message like, "you have entered more characters for fieldName"

        Attachments

        1. 30-01-2015.JPG
          30-01-2015.JPG
          98 kB
        2. RelationshipTypeForm(30-01-2015).JPG
          RelationshipTypeForm(30-01-2015).JPG
          112 kB
        3. validation.patch
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              pralay pralay ramteke
              Reporter:
              k.joseph Kaweesi Joseph
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: