validation changes and test validation on api