added validations, client side and db. as well as additional js