mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-29 22:31:29 +01:00
adfc2f234d
* Remove unused SAML Artifact Binding properties * Remove unused validators
10 lines
373 B
TypeScript
10 lines
373 B
TypeScript
import { AbstractControl, ValidationErrors, Validators } from "@angular/forms";
|
|
|
|
/**
|
|
* Runs Validators.required on a field only if it's dirty. This prevents error messages from being displayed
|
|
* to the user prematurely.
|
|
*/
|
|
export function dirtyRequired(control: AbstractControl): ValidationErrors | null {
|
|
return control.dirty ? Validators.required(control) : null;
|
|
}
|