@egotec/form-validator
v1.1.9
Published
The Validator simplifies the validation of typical form fields
Readme
General
The ValidationHelper provides important methods for validating typical form fields.
Installation
In the host project, specify the following package in the package.json:
"@egotec/form-validator": "^1.x"Usage
import {ValidationModule} from '@egotec/form-validator'public constructor(
public vh: ValidationHelper
) {
}How to call
this.vh.isValidVatRegNo(options: {scope: any, varName: string, replaceInputWithResult: boolean, matchCountry: string|null}): booleanexample
// Standard
this.vh.isValidVatRegNo({scope: this, varName: 'myVatVarName'})
// Erweitert
this.vh.isValidVatRegNo({scope: this, varName: 'myVatVarName', replaceInputWithResult: false, matchCountry: 'DE'})