import { Component , OnInit } from '@angular/core' ; import { ThyFormValidatorConfig , ThyFormDirective } from 'ngx-tethys' ; @ Component ( { selector : 'thy-form-validate-example' , templateUrl : './validate.component.html' } ) export class ThyFormValidateExampleComponent implements OnInit { model = { name : '' , password : '' , email : '' } ; validateConfig : ThyFormValidatorConfig = { validationMessages : { username : { required : 'Username is required' } , password : { required : 'Password is required' } , email : { required : 'Email is required' , email : 'Typed email is invalid' } } } ; constructor ( ) { } ngOnInit ( ) { } submit ( ) { } reset ( form ) { form . validator . reset ( ) ; this . model = { name : '' , password : '' , email : '' } ; } }