pub fn validate(u: UInt) -> Result<(), Error>