As I understand, subnet mask must be contiguous. So e.g. you can't have a mask of 255.1.0.0. The networks are often denoted as e.g. 192.168.5.0/24, which automatically contains all the information to derive the subnet mask, and with such a derivation it is guaranteed to be contiguous.
Why do the users have to manually "expand" this number 24 into 255.255.255.0 instead of simply entering the number 24 into network configuration? Is there any case where subnet mask would be required and the number of 1-bits in the mask not sufficient for configuration?