How to create a duplicate number warning message when creating a new customer from POS?

Reference: How to check duplicate record? - #2 by NCP