fix validate in sample cfg class