LyNullableStringIsNumeric constructor

LyNullableStringIsNumeric(
  1. String message
)

Validation that requires a string to contain only numbers.

If the value contains anything other than numbers, the message is returned.

Example:

final validator = LyNullableStringIsNumeric('Invalid numeric');
final result = validation('abc123');
print(result); // Invalid numeric

Implementation

LyNullableStringIsNumeric(super.message);