IntegerAnswerFormat validation with no max value.
See original GitHub issueAccording to the comment on the constructor and on getMaxValue 0 should be used to specify no max value but the validation never checks for a zero value.
@param maxValue maximum allowed value, 0 if no max
Validation:
...
else if(intAnswer > getMaxValue())
{
return new BodyAnswer(false,
R.string.rsb_invalid_answer_integer_over,
String.valueOf(getMaxValue()));
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Min/Max-value validators in asp.net mvc - Stack Overflow
I don't think min/max validations attribute exist. I would use something like [Range(1, Int32.MaxValue)]. for minimum value 1 and
Read more >Values that exceed max int do not show validation in ... - GitHub
I can see a validation message if I use the Html.ValidationMessageFor method. I will get something like "The value '99999999999999999999999' is invalid." The ......
Read more >HTML attribute: max - HTML: HyperText Markup Language
The max attribute defines the maximum value that is acceptable and valid for the input containing the attribute. If the value of the...
Read more >VBCS: inputNumber with max and min values - throw error if ...
We wanted to show some notification to the user if user enters a value greater than the max value and tabs out, so...
Read more >Add MinValueAttribute and MaxValueAttribute for Model ...
It would be easier to read and write and more similar to string validation, if there would be the attributes MinValue and MaxValue,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like the corresponding ResearchKit class uses ‘nil’ for unused min/max values. I think that settles it in favor of
null
, or the same survey JSON will yield different outcomes for the two platforms.Maybe I’ll keep the return type to getMaxValue()/ getMinValue() as ints and return MAX_INT/MIN_INT there to avoid breaking any custom validators.