Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const censor = (word:string):ValidatorFn => (control:AbstractControl):ValidationErrors|null => {
- if(control.value.indexOf(word) != -1){
- return {
- 'badword':word
- }
- }else{
- return null
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement