anchor.diff:           validate_has_params/1,
            validate_memory_quota/2,
            validate_any_value/2,
  +         validate_by_fun/3,
            execute_if_validated/3]).
   
   %% used by parse_validate_number
  
positive.code: validate_has_params(State) ->
      State.
  
  validate_memory_quota(Name, {_, InList, _} = State) ->
      MemoryQuota = proplists:get_value(Name, InList),
      case MemoryQuota of
         undefined ->
              State;
         _ ->
              {MinMemoryMB, MaxMemoryMB, QuotaErrorDetailsFun} =
                  ns_storage_conf:allowed_node_quota_range(),
              if
                  MemoryQuota < MinMemoryMB ->
                      return_error(Name,
                                   ["The RAM Quota value is too small.", QuotaErrorDetailsFun()],
                                   State);
                  MemoryQuota > MaxMemoryMB ->
                      return_error(Name,
                                   ["The RAM Quota value is too large.", QuotaErrorDetailsFun()],
                                   State);
                  true ->
                      State
              end
     end.
  
  validate_any_value(Name, {OutList, _, _} = State) ->
      case lists:keyfind(atom_to_list(Name), 1, OutList) of
  
negative.code:     {lists:keydelete(atom_to_list(Name), 1, OutList), InList,
       [{Name, iolist_to_binary(Error)} | Errors]}.
  
  validate_by_fun(Fun, Name, {_, InList, _} = State) ->
      Value = proplists:get_value(Name, InList),
      case Value of
          undefined ->
              State;
          _ ->
              case Fun(Value) of
                  ok ->
                      State;
                  {error, Error} ->
                      return_error(Name, Error, State)
              end
      end.
  
  validate_boolean(Name, {OutList, _, _} = State) ->
      Value = proplists:get_value(atom_to_list(Name), OutList),
      case Value of
  