Added javascript validations to edit action