isTelegramProfileUrl method
FieldValidator<String?, String?>
isTelegramProfileUrl({
- MessageCallBack<
String> ? message, - String? userName,
Check string is telegram profile url
Implementation
FieldValidator<String?, String?> isTelegramProfileUrl({
MessageCallBack<String>? message,
String? userName,
}) {
return next((messages, value) {
if (value != null && !value.isTelegramProfileUrl(userName: userName)) {
return message?.call(messages, value) ??
messages.invalidTelegramProfileUrl(userName ?? 'empty');
}
return null;
});
}