LyStringIsFQDN class

Validation that requires a string to be a fully-qualified domain name.

If the value is not a fully-qualified domain name, the message is returned.

Example:

final validator = StringIsFQDN('Invalid FQDN');
final result = validation('google,com');
print(result); // Invalid FQDN

Constructors

LyStringIsFQDN(String message, [bool requireTld = true, bool allowUnderscores = false])
Validation that requires a string to be a fully-qualified domain name.

Properties

allowUnderscores bool
Whether to allow underscores in hostnames.
final
hashCode int
The hash code for this object.
no setterinherited
message String
finalinherited
requireTld bool
Whether to require a top-level domain.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(String value) String?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator &(LyBaseValidator<String> other) → LyBaseValidator<String>
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator |(LyBaseValidator<String> other) → LyBaseValidator<String>
inherited