import { RequiredFieldRule } from './required-field-rule';
/**
 * A rule that checks the value is empty or not which value type is object array
 */
export class FileUploaderRequiredRule extends RequiredFieldRule {
  constructor() {
    super(...arguments);
    /**
     * re-define the object array check item type method
     *
     * @param {unknown} item the array item
     * @returns {boolean} true or false
     */
    this.checkArrayItemType = (item) => !!(item && typeof item === 'object');
  }
}
