acanthis 0.1.2 copy "acanthis: ^0.1.2" to clipboard
acanthis: ^0.1.2 copied to clipboard

Acanthis is an easy-to-use validation library for Dart and Flutter.

example/lib/example.dart

import 'package:acanthis/acanthis.dart' as acanthis;

void main() {
  final email = acanthis.string().email().min(5).max(20);
  final result = email.tryParse('test@test.com');

  if (result.success) {
    print('Email is valid');
  } else {
    print('Email is invalid');
  }
}