add validation to sacaffold