Add constraint to optional sonata admin