modify api validation