required=False for Nested Types


#1

Hello

How can I use Nested types that are optional.
I have the following types

class Location(types.Type):
    longitude = validators.Number()
    latitude = validators.Number()


class Product(types.Type):
    message = validators.String(max_length=100)
    location = Location

and I would like to have the location to be required=False.

I have tried something like

class Product(types.Type):
    message = validators.String(max_length=100)
    location = validators.Object(type=Location, required=False)

(but this does not work).

And I could not find documentation on this point.