UNPKG

turbogui-angular

Version:

A library that tries to help with the most common user interface elements on several frameworks and platforms

32 lines 1.63 kB
/** * TurboGUI is A library that helps with the most common and generic UI elements and functionalities * * Website : -> http://www.turbogui.org * License : -> Licensed under the Apache License, Version 2.0. You may not use this file except in compliance with the License. * License Url : -> http://www.apache.org/licenses/LICENSE-2.0 * CopyRight : -> Copyright 2018 Edertone Advanded Solutions. https://www.edertone.com */ import { FormControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms'; /** * Validation class that extends the base angular Form Validators class and adds extra useful validators */ export declare class ValidatorsPlus extends Validators { /** * Verify that the data of a form value is required and also Not semantically empty, just like the * TurboCommons StringUtils.isEmpty method does */ static nonEmpty(control: FormControl): ValidationErrors | null; /** * Validator to check that at least one of the specified form controls has a non empty value. * Non empty criteria is the same as the nonEmpty validator on this same class, which verifies that the value is not semantically empty. * * To use this validator, you need to pass an array of control names that you want to check. And set it to the validators property * of the form builder group. * * @param controlNames An array of control names to check. For example, ['name', 'surname']. * * @returns A validator function. */ static atLeastOneIsNotEmpty(controlNames: string[]): ValidatorFn; } //# sourceMappingURL=ValidatorsPlus.d.ts.map