Skip to content

Validate the input of the concentration field in the Sample #1795

@diegoliberman

Description

@diegoliberman

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:

  1. Any number
  2. The letter e and the letter E
  3. The plus sign +
  4. 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:

  1. There is only 1 consonant.
  2. The consonant is followed by the plus sign
  3. No negatives

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions