Closed jithendralal closed 4 years ago
only datatype
For testing:
Currently you cannot start typing with a symbol '-', so validate only when Next is clicked
Testing failed as the HEIGHTCLIN
CDE in the Baseline PROMS survey can accept decimal and exponential (×10n) notation. The info entered is pulled, but shows a validation error when opening the Baseline PROMS data page.
"Very wrong" data, such as using multiple decimals in a row (e.g. "125....2..e....e...e....eeeee.44.") is erased when clicking Next in the survey. Accepted data will persist when clicking Next -- the data entered in the field will be present in the next field when clicking Next. Not interacting with the field leaves it blank, but entering more data or backspacing any "persisted" data in the new field will update as entered data.
With the addition of the integer validation, this strange behaviour was noted in the HEIGHTCLIN question:
Step 1. Enter 'a' (shows invalid) Step 2. Clear 'a' (shows valid) Step 3. Try to enter 'a' (this is not allowed)
Step 1. Enter '-' (shows invalid) Step 2. Enter '2' (shows valid) Step 3. Now try to clear '2' (not allowed) (shows invalid) Step 4. Clear '-' (shows valid) Step 5. Clear '2' (shows valid) Step 6. Try to enter '-' (not allowed) (shows invalid)
Once the user's input is invalid, the buttons remain disabled, even after clearing the input box. (A blank input box remains invalid.)
To make the buttons enable again, the user has to type some digit. OR Even to skip the question, the user has to type some digit and delete it.
In Google Chrome, on an Android One phone;
WEIGHTCLIN
does not accept decimals, as it will show a warning for any non-numeric character, though will show the characters in the field.~
WEIGHTCLIN
will allow at least one digit, then a decimal, then at least one more digit. A single decimal, or anything starting or ending with a decimal, is not accepted.HEIGHTCLIN
, unless they are the first characters entered.HEIGHTCLIN
, which must be cleared by adding or removing a character.WEIGHTCLIN
before the validation is cleared and the user can progress.~
WEIGHTCLIN
, according to the pattern described above.HEIGHTCLIN
then attempting to enter another causes the empty field to show a warning, which can only be cleared by entering a valid character.HEIGHTCLIN
shows a warning and shifts the cursor between the negative and the 2, from where the negative can be removed to make the field valid.
WEIGHTCLIN
— the 2 is removed, rather than the cursor shifting. This may be because WEIGHTCLIN
renders non-numeric characters when typing, though with a validation error, whereas HEIGHTCLIN
does not.Device: mobile
Failed as the integer behaviour (field HEIGHTCLIN
) is odd;
WEIGHTCLIN
).These issues are fixed by the commit https://github.com/muccg/rdrf/commit/8ac920e5f5aec388043f08b9b1f471fab984a69b
The integer type survey questions do not have validations -- the validations work on admin forms only