venosyd_common_validators 1.0.0

Venosyd Commom Validators #

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

Sample #

  • validateEmail
var email = '';
if (validadeEmail(email) {
  • validadeFutureDate

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

var date = new DateTime('2099', '11', '21');
if (validadeFutureDate(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) {
  • validateName / validateNameWithSpace

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

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

venosyd ©2016

Changelog #

1.0.0 #

  • Initial version


// Copyright (c) 2016, Sergio Lisan. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:venosyd_common_validators/venosyd_common_validators.dart';

main() {
  var awesome = new Awesome();
  print('awesome: ${awesome.isAwesome}');

Use this package as a library

1. Depend on it

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

  venosyd_common_validators: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub 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';
Awaiting analysis to complete.