validate 1.6.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 96

Validate

Lightweight library for validating function arguments in Dart.

This library is mainly a port of Apaches org.apache.commons.lang3.Validate class

Validation is necessary on most public-facing APIs. Parameter validation on non-public methods is not as important - it is often desirable to have validation occur only once, at the public 'entry point' - but if you can live with the potential performance hit, I recommend to validate parameters everywhere, as it makes code maintenance and refactoring a bit easier.

For further documentation please refere to the Unit-Tests.

History

  • 1.4.0 - Instance check added
  • 1.3.0 - Validate.isUUID added
  • 1.2.7 - Removed debug info from URIBuilder
  • 1.2.4 - Runs with Dart 1.1 + IntelliJ 13
  • 1.2.0 - isKeyInMap check added
  • 1.1.0 - isJson check added
  • 1.0.5 - Changed GitHub-Repository to dart-validate
  • 1.0.4 - Replaced NullPointerException with ArgumentError - makes more sense

You can see further changes on the CHANGELOG!

License

Copyright 2017 Michael Mitterer, IT-Consulting and Development Limited,
Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, 
software distributed under the License is distributed on an 
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
either express or implied. See the License for the specific language 
governing permissions and limitations under the License.

If this plugin is helpful for you - please (Circle) me.

Change Log for validate

This class assists in validating method arguments

v1.5.4 - 2017-01-31

Docs

v1.5.3 - 2016-11-16

Docs

v1.5.2 - 2016-07-14

Docs

  • isKeyInMap shows Map as JSON-Structure 471c4e2

v1.5.1 - 2015-12-08

Docs

v1.5.0 - 2015-12-08

Feature

  • Changed to 'test', improved password-pattern 13e0926

Docs

This CHANGELOG.md was generated with Changelog for Dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  validate: "^1.6.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:validate/validate.dart';
  
Version Uploaded Documentation Archive
1.6.0 Dec 13, 2017 Go to the documentation of validate 1.6.0 Download validate 1.6.0 archive
1.5.4 Jan 31, 2017 Go to the documentation of validate 1.5.4 Download validate 1.5.4 archive
1.5.3 Nov 16, 2016 Go to the documentation of validate 1.5.3 Download validate 1.5.3 archive
1.5.2 Jul 14, 2016 Go to the documentation of validate 1.5.2 Download validate 1.5.2 archive
1.5.1 Dec 8, 2015 Go to the documentation of validate 1.5.1 Download validate 1.5.1 archive
1.5.0 Dec 8, 2015 Go to the documentation of validate 1.5.0 Download validate 1.5.0 archive
1.4.2 Dec 19, 2014 Go to the documentation of validate 1.4.2 Download validate 1.4.2 archive
1.4.1 Dec 19, 2014 Go to the documentation of validate 1.4.1 Download validate 1.4.1 archive
1.4.0 Dec 19, 2014 Go to the documentation of validate 1.4.0 Download validate 1.4.0 archive
1.3.3 Oct 24, 2014 Go to the documentation of validate 1.3.3 Download validate 1.3.3 archive

All 24 versions...

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
93 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
96
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:validate/validate.dart.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use validate.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 4 hints.

    Run dartfmt to format lib/src/errors.dart.

    Run dartfmt to format lib/src/utils.dart.

    Similar analysis of the following files failed:

    • lib/validate.dart (hint)
  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
browser ^0.10.0 0.10.0+3
logging ^0.11.0 0.11.3+1
logging_handlers ^0.8.0 0.8.0
Transitive dependencies
intl 0.15.6
path 1.6.1
Dev dependencies
grinder any
test any