fix validation api