unified style units
refactored js - validateNum