Accenture interview question

Write a custom validator and a custom Angular pipe.