I posted a fairly robust out-of-box Appian-based validation rule that I've developed and refined over several years, to the first thread Carlos Santander linked above. If you decide to try that, please feel free to let me know if you have any issues.