I'm new to Angular and was going through various scenarios and examples. One of the examples I came across is the following custom validator:
confirmationValidator = (control: FormControl): { [s: string]: boolean } => {
if (!control.value) {
return { required: true };
} else if (control.value !== this.validateForm.controls.password.value) {
return { confirm: true, error: true };
}
return {};
};
In the above, what is the code { [s: string]: boolean }
mean? Is it checking for the input value or it is used for something else?