After filling up your model instance with values, validating it is quite simple:

<?phpnamespaceCraft;if($ingredient->validate()){// It validates!}else{// Here's a list of all the errors, grouped by attribute:$ingredient->getErrors();// Here's a list of errors for a single attribute:$ingredient->getErrors('name');}