Public bug reported:

Date
On date fields there doesn’t seem to be any form of validation. The field 
accepts keyboard input, but only numbers or dashes. But when entered manually 
there’s no validation if say 43729-4784-475-- is a valid date. When the values 
are persisted, and the form is reopened, this particular input resulted in the 
date 4375-12-17.

Number
Number fields have validation. It’s allowed to enter any text in the field, but 
when saving, it’s validated and seems to only accept numbers, dots, commas and 
dash (minus). There’s however no extra validation for data elements for 
positive integers for instance. It still allows minus and commas/dots. One 
other weird validation is that numbers 3,4  3.4  -3.4 all seems to be valid, 
but -3,4 is not valid. So it seems to allow commas to be used for decimals (it 
also converts dots into commas), but it doesn’t allow negative decimals with 
commas, only with dots. In addition when opening the form later, the decimal 
parts of the numbers are removed, both for number type «number», and for number 
type «integer». The result from the api call seems to contain the decimal part, 
so removing the decimal part for type «number» in the form must be considered 
to be a bug.

Drop-downs/Option sets
When text is entered into drop-down fields and deleted again, the field seems 
to be marked as dirty and validated to not contain a value from the option set. 
So a non-mandatory field isn’t allowed to be saved as empty, if some text is 
typed in or a value is selected and then deleted. So this is the most buggy 
validation in my opinion.

The data fields are tested in a custom form in event capture, but the
same issues might also be present in the default form, and perhaps in
other places.

** Affects: dhis2
     Importance: Undecided
     Assignee: Abyot Asalefew Gizaw (abyot)
         Status: New

** Changed in: dhis2
     Assignee: (unassigned) => Abyot Asalefew Gizaw (abyot)

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1400688

Title:
  Validation of data fields in event capture

Status in DHIS 2:
  New

Bug description:
  Date
  On date fields there doesn’t seem to be any form of validation. The field 
accepts keyboard input, but only numbers or dashes. But when entered manually 
there’s no validation if say 43729-4784-475-- is a valid date. When the values 
are persisted, and the form is reopened, this particular input resulted in the 
date 4375-12-17.

  Number
  Number fields have validation. It’s allowed to enter any text in the field, 
but when saving, it’s validated and seems to only accept numbers, dots, commas 
and dash (minus). There’s however no extra validation for data elements for 
positive integers for instance. It still allows minus and commas/dots. One 
other weird validation is that numbers 3,4  3.4  -3.4 all seems to be valid, 
but -3,4 is not valid. So it seems to allow commas to be used for decimals (it 
also converts dots into commas), but it doesn’t allow negative decimals with 
commas, only with dots. In addition when opening the form later, the decimal 
parts of the numbers are removed, both for number type «number», and for number 
type «integer». The result from the api call seems to contain the decimal part, 
so removing the decimal part for type «number» in the form must be considered 
to be a bug.

  Drop-downs/Option sets
  When text is entered into drop-down fields and deleted again, the field seems 
to be marked as dirty and validated to not contain a value from the option set. 
So a non-mandatory field isn’t allowed to be saved as empty, if some text is 
typed in or a value is selected and then deleted. So this is the most buggy 
validation in my opinion.

  The data fields are tested in a custom form in event capture, but the
  same issues might also be present in the default form, and perhaps in
  other places.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1400688/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to