Demo code for Promise Based Validation