Validation tests for semiparametric models