isStackoverflowQuestionUrl method
FieldValidator<String?, String?>
isStackoverflowQuestionUrl({
- MessageCallBack<
String> ? message, - String? id,
Check string is stackoverflow question url
Implementation
FieldValidator<String?, String?> isStackoverflowQuestionUrl({
MessageCallBack<String>? message,
String? id,
}) {
return next((messages, value) {
if (value != null && !value.isStackoverflowQuestionUrl(id: id)) {
return message?.call(messages, value) ??
messages.invalidStackoverflowQuestionUrl(id ?? 'empty');
}
return null;
});
}