Adding a basic validation message functionality in client side