In our webapp, we have field which should accept only integers or letter e (Shorthand for 2e which translates to 2*10).
I would like to evaluate the input, so if user types only:
e - it will not pass (if this validation would be too complicated, it can be omitted)
12 - (int) it will pass
12e - (int + e) it will pass
12ab - it will not pass
How can I do that?
I was able to do only
${is_type}= Evaluate isinstance($variable, int)
But that works only with pure integers. How can I make it works, so that it accepts integer + this specific letter of alphabet (not all of them)?
I’m not sure to understand the need.
The goal is to Input Text these values and verify the field accepts it?
How do you check the Pass or Fail of the value? Field has a specific border, raises an error?
If you have the value, maybe a Regex evaluation could be easier:
This specific field does not raise error, I wanted to prevent bad usage of a keyword, but after brief discussion with a colleague I realized it would be way too complex.
I like the simplicity of your solution and it might come in handy (I am sure it will) in future keywords, so I´ll mark it as a solution.