validation across multiple models

Hi, I've a Category model with fields:
*id
*name
*project_id

and class defition: