fixes #7430 - Adds subnet mask validation