Accordingly to the documentation of isNillable
method of Schema.DescribeFieldResult
class:
isNillable()
Returns true if the field is nillable, false otherwise. A nillable field can have empty content. A non-nillable field must have a value for the object to be created or saved.
Is it correct to state that a necessary and sufficient condition for a field to be required is that isNillable
method returns false?
I'm pretty sure that it is a necessary condition but not so sure that it is also a sufficient condition if we take into account also validation rules and triggers.