string_validator 0.1.4 copy "string_validator: ^0.1.4" to clipboard
string_validator: ^0.1.4 copied to clipboard

outdated

Dart library for validating and sanitizing strings, especially those from user input.

example/example.dart

import 'package:string_validator/string_validator.dart';

main() {
  String userInput = 'http://localhost:61500this is an invalid url!!!!';
  bool isValid = isURL(userInput); // false

  userInput = 'me@example.com';
  isValid = isEmail(userInput); // true

  userInput = 'password1';
  isValid = isLength(userInput, 12); // false
}
353
likes
0
pub points
98%
popularity

Publisher

verified publishersuragch.dev

Dart library for validating and sanitizing strings, especially those from user input.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on string_validator