I have tested with the change max:5,which is working fine.

Can't we use "number": [1,2,3,4,5] because here also it will allow from 1 to maximum of 5 numbers?
Is there any specific reason to use max:5?