Validate forms using classes or arrays