venosyd_common_validators 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 56

Venosyd Commom Validators

The Opensyd reusability approach for validators in Dart. Based on
Verbal Expressions.

Sample

  • validateEmail
var email = 'dude@email.com';
if (validadeEmail(email) {
    register(email);
}
  • validadeFutureDate

Used when you want to someone choose a date after today.

var date = new DateTime('2099', '11', '21');
if (validadeFutureDate(date) {
    someCode(date);
}
  • validateText / validateTextWithLimit

Used when you want to the user enters only characters used
in common dissertative or descritive texts.

var text = '''
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
    In molestie bibendum gravida. Sed egestas venenatis ex, 
    vitae malesuada nibh consectetur nec. Integer posuere 
    pharetra justo, et egestas tellus imperdiet sed. Proin 
    eu augue molestie, egestas libero sed, tempus sapien. 
''';

if (validateText(text) {
    sendToBlog(text);
}
  • validateName / validateNameWithSpace

Validate common used chars for names, in Western method (needs upgrade).

var name = 'Roberto Santos Carlos Almeidinha';
if (validateNameWithSpace(name) {
    register(name);
}
  • validateAddress
var address = 'Priest Namegon St, 992 - Simula, DE';
if (validateAddress(address) {
    sendPackageTo(address);
}
  • validatePhone
var phone = '+42 11 99299-2299';
if (validatePhone(phone) {
    call(phone);
}

venosyd ©2016

Changelog

1.0.0

  • Initial version

example/venosyd_common_validators_example.dart

/**
 * @author sergio lisan
 *
 *  see LICENSE
 *
 *  validators sample
 *
 */

main() {

}

Use this package as a library

1. Depend on it

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


dependencies:
  venosyd_common_validators: "^1.0.2"

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:venosyd_common_validators/venosyd_common_validators.dart';
  
Version Uploaded Documentation Archive
1.0.2 Feb 17, 2017 Go to the documentation of venosyd_common_validators 1.0.2 Download venosyd_common_validators 1.0.2 archive
1.0.1 Dec 16, 2016 Go to the documentation of venosyd_common_validators 1.0.1 Download venosyd_common_validators 1.0.1 archive
1.0.0 Dec 16, 2016 Go to the documentation of venosyd_common_validators 1.0.0 Download venosyd_common_validators 1.0.0 archive

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]
32 / 100
Health:
Code health derived from static analysis. [more]
93 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60 / 100
Overall score:
Weighted score of the above. [more]
56
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • Fix .analysis_options.

    We were unable to parse .analysis_options.

  • Package is getting outdated.

    The package was released 72 weeks ago.

  • 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.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 5 hints.

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

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

    Similar analysis of the following files failed:

    • lib/src/specialchar_eval.dart (hint)
    • lib/src/text_eval.dart (hint)
    • lib/venosyd_common_validators.dart (hint)
  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

    analyzer:
      strong-mode: true
    

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
intl >=0.12.0 <0.15.0 0.14.0 0.15.6
verbal_expressions >=0.3.0 <0.4.0 0.3.1
Dev dependencies
test >=0.12.0 <0.13.0