The raw input
isNaturalNumberString("1") >>
{
valid: true,
parsed: 1,
};
isNaturalNumberString("") >>
{
valid: false,
error: 'Not a number: ""',
};
isNaturalNumberString("0.5") >>
{
valid: false,
error: 'Not an integer: "0.5"',
};
isNaturalNumberString("0") >>
{
valid: false,
error: 'Not a natural number: "0"',
};
Validate a natural number string