diff --git a/README.md b/README.md index f016542..907555c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ # nativescript-input-validator-ng2 Example of input validation component for nativescript ng2, using class-validator +export class Login { + @IsEmail(undefined, {message:"Email invalid"}) + @IsNotEmpty({message:"Email is required"}) + email: string; + + @IsNotEmpty({message:"Password is required"}) + password: string; +} + ![screen](https://cloud.githubusercontent.com/assets/22457603/23334454/9ca32b10-fb7d-11e6-84c3-734d63376ff5.png)