Fix number attribute value range validation and add a non-regression scenario