Skip to content

Example of input validation component for nativescript ng2, using class-validator

Notifications You must be signed in to change notification settings

fcostaprojects/nativescript-input-validator-ng2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nativescript-input-validator-ng2

Example of input validation component for nativescript ng2, using class-validator

export abstract class BasicModel {

}

export class Login extends BasicModel  {

   @IsEmail(undefined, {message:"Email invalid"})
   @IsNotEmpty({message:"Email is required"})
   email: string;

   @IsNotEmpty({message:"Password is required"})
   password: string;
}

export class Book extends BasicModel {

   @IsNotEmpty({message:"Name is required"})
   name: string;

   @IsNotEmpty({message:"Author is required"})
   author: string;
   
   @IsNotEmpty({message:"Pages is required"})
   pages: string;

}

screen

screen-book

About

Example of input validation component for nativescript ng2, using class-validator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published