code: function validator (
      id,
      def
    ) {
      if (def === undefined) {
        return Vue.options['validators'][id]
      } else {
        Vue.options['validators'][id] = def;
        if (def === null) {
          delete Vue.options['validators']['id'];
        }
      }
    }
docs: Register or retrieve a global validator definition.