Add #generate_object to length validator