update js validation