Created
March 18, 2019 14:44
-
-
Save mdmoin7/c555c6d9ed48597627974524718434bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FormControl } from '@angular/forms'; | |
export function zipCodeValidator(ctrl: FormControl) { | |
if (ctrl.value === 123456) { | |
return null; | |
} | |
return { | |
zipCode: { validCode: 123456 } | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment