validator_lint 1.0.1 copy "validator_lint: ^1.0.1" to clipboard
validator_lint: ^1.0.1 copied to clipboard

A lint making sure all TextFormFields have a validator.

validator_lint #

Features #

Lint that informs the user when a TextFormField has no validator.

Getting started #

Installation #

  1. Add validator_lint and custom_lint as a dev dependency in your project's pubspec.yaml.

    dart pub add validator_lint custom_lint --dev
    
  2. In your analysis_options.yaml add include: package:validator_lint/analysis_options.yaml. You might want to exclude some files (e.g generated json serializable) from analysis.

  3. Enable the custom_lint analyzer plugin in analysis_options.yaml. You can customize lint rules by adding a custom_lint config with a rules section.

  4. Run flutter pub get in your project main directory and restart your IDE. You're ready to go!

Usage #

Example analysis_options.yaml:


custom_lint:
  rules:
    - validator_lint: true

analyzer:
  plugins:
    # Required for our custom lints support
    - custom_lint
  exclude:
    - '**/*.g.dart'
1
likes
160
points
98
downloads

Publisher

unverified uploader

Weekly Downloads

A lint making sure all TextFormFields have a validator.

Repository (GitHub)
View/report issues

Topics

#lints

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on validator_lint