ValidaString.fromJson constructor
Implementation
factory ValidaString.fromJson(Map<String, Object?> map) {
return ValidaString(
isIn:
map['isIn'] == null ? null : List<String>.from(map['isIn']! as List),
maxLength: map['maxLength'] as int?,
minLength: map['minLength'] as int?,
isPhone: map['isPhone'] as bool?,
isEmail: map['isEmail'] as bool?,
isDate: map['isDate'] as bool?,
isTime: map['isTime'] as bool?,
isBool: map['isBool'] as bool?,
isNum: map['isNum'] as bool?,
isUrl: map['isUrl'] as bool?,
isUUID: map['isUUID'] is UUIDVersion
? map['isUUID']! as UUIDVersion
: _parseEnum(map['isUUID'] as String?, UUIDVersion.values),
isCurrency: map['isCurrency'] as bool?,
isJSON: map['isJSON'] as bool?,
matches: map['matches'] as String?,
contains: map['contains'] as String?,
isAlpha: map['isAlpha'] as bool?,
isAlphanumeric: map['isAlphanumeric'] as bool?,
isLowercase: map['isLowercase'] as bool?,
isUppercase: map['isUppercase'] as bool?,
customValidateName: map['customValidate'] as String?,
isAscii: map['isAscii'] as bool?,
isBase64: map['isBase64'] as bool?,
isCreditCard: map['isCreditCard'] as bool?,
isFQDN: map['isFQDN'] as bool?,
isHexadecimal: map['isHexadecimal'] as bool?,
isHexColor: map['isHexColor'] as bool?,
isDivisibleBy: map['isDivisibleBy'] as int?,
surrogatePairsLengthMin: map['surrogatePairsLengthMin'] as int?,
surrogatePairsLengthMax: map['surrogatePairsLengthMax'] as int?,
isInt: map['isInt'] as bool?,
isFloat: map['isFloat'] as bool?,
isISBN: map['isISBN'] is ISBNVersion
? map['isISBN']! as ISBNVersion
: _parseEnum(map['isISBN'] as String?, ISBNVersion.values),
isIP: map['isIP'] is IPVersion
? map['isIP']! as IPVersion
: _parseEnum(map['isIP'] as String?, IPVersion.values),
);
}