Validate your object and types of form with simple code