When entering values such as 1e+30, there is a probability that the user enters an incorrect value. I have tested entering ijadsijdsidsj and the sample was saved without errors. When coming back to the sample it would show the concentration with a value of zero.
Let's at least validate that the allowed values are:
- Any number
- The letter
e and the letter E
- The plus sign
+
- The decimal separator
.
If the user inputs any other character, we should show an error message informing an example of an acceptable value in the scientific notation.
We should also validate that:
- There is only 1 consonant.
- The consonant is followed by the plus sign
- No negatives