UserNum constructor
- String val
Implementation
factory UserNum(String val) {
val = val.replaceAll(' ', '');
if (val.length != 16) {
throw const FormatException('Must be 16 characters long');
} else if (!val.isNumericOnly) {
throw const FormatException('Must be numeric only');
}
return UserNum._(val);
}