Cell should not allow user to type more than 3 decimal values

And the second is, is it possible to control the number of whole number to be typed?

I do not understand this request. Can you share an example?