1"use strict"; 2(self["webpackChunkcommon"] = self["webpackChunkcommon"] || []).push([[76],{ 3 4/***/ 31316: 5/*!**************************************************!*\ 6 !*** ./src/app/validators/matchTwoFormFields.ts ***! 7 \**************************************************/ 8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 10__webpack_require__.r(__webpack_exports__); 11/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12/* harmony export */ matchingFields: () => (/* binding */ matchingFields) 13/* harmony export */ }); 14// custom validator to check that two fields match 15function matchingFields(controlName, matchingControlName) { 16 return formGroup => { 17 const control = formGroup.controls[controlName]; 18 const matchingControl = formGroup.controls[matchingControlName]; 19 if (matchingControl.errors && !matchingControl.errors.confirmMatch) { 20 // return if another validator has already found an error on the matchingControl 21 return; 22 } 23 // set error on matchingControl if validation fails 24 if (control.value !== matchingControl.value) { 25 matchingControl.setErrors({ 26 confirmMatch: true 27 }); 28 } else { 29 matchingControl.setErrors(null); 30 } 31 }; 32} 33 34/***/ }) 35 36}]); 37//# sourceMappingURL=common.eebbc7d8b4c463df.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.