fix validate JS issue