validate(data = null, flags = {}) {
    data = data || this.rootValue;
    return this.validateComponents(this.getComponents().map((component) => component.component), data, flags);
  }
Validate a nested component with data, or its own internal data.
@param {import('@formio/core').DataObject} data - The data to validate.
@param {object} flags - The flags to use when validating.
@returns {Array} - The errors if any exist.