Js validation

Added javascript validation