Issue Bug Closed

#57164NumberRangeValidator does not get options correctly

Thomas Hucke 03/21/14, 18:30 updated 10/23/17, 21:40

Description

The validation always fails when I add the following annotation in my model * @validate NumberRange(minimum=1,maximum=999)

Adding DEBUG info to the NumberRangeValidator I see that $this->options[] does not get filled correctly. Only $this->options[‘minimum’] gets filled. $this->options[‘maximum’] is not set.

Unfortunately I don´t find the right place to check why the second option doesn´t get filled.
I see that something is weired there but I cannot go more into it – sorry :-(

BTW:
I´d been great if only one option could be mandatory because actually I´d like to check “Greater than” with only providing the ‘minimum’ option.

Reviews 3