code: function showRequiredStar(validators) {
    if (!validators) {
      return false;
    }
    return validators.find(({type, type2}) => type === 'required' || type2 === 'required') !== undefined;
  }
docs: helper functions
   
  @param {Array|Null} validators 当不需要校验的时候为null
  @return {boolean} 当是必选项的时候，输出true否则为false