The JsChecker should check for values less than 0, instead of forcing to -1
Summary
At the moment, the JsChecker used in AjaxAction Forms checks whether the value of a given input is exactly equal to "-1". This might lead to incompatibilities with existing apps that use more "placeholder" or special actions in selects, by assigning them progressive negative numbers (like -2, -3, etc…).
Expected Behavior
At any given point, a negative value in a select should be considered as something invalid. This should not be applied to other inputs, where the existing rules still work.
Actual Behavior
Core allows any option which does not use "-1" as its value.
Test Case
- Define a select tag with a bunch of options with negative values.
- Use the
checkForms()
function to trigger the JsChecker and see that any value is accepted, except for the one marked with "-1".