aug_validateform_annotations 0.0.1-dev.2
aug_validateform_annotations: ^0.0.1-dev.2 copied to clipboard
Core annotations for aug_validateform. Pure Dart package with zero dependencies.
import 'package:aug_validateform_annotations/aug_validateform_annotations.dart';
@Validatable()
class User {
@Required(message: 'Name is required')
final String name;
@Email(message: 'Invalid email')
final String email;
@MinLength(8, message: 'Password must be at least 8 characters')
final String password;
const User({
required this.name,
required this.email,
required this.password,
});
}
void main() {
// This is a pure Dart example showing how to use the annotations.
// The actual validation logic is generated by aug_validateform_generator.
print('Annotations are defined for the User class.');
}