title: Mule custom validation with property or parameter
body: <p>We are trying migrating our existing code to Mule, in order to complete all the validation, we need custom validator to be more powerful to support the following:</p>
  
  <pre><code>&lt;RULE&gt;
      &lt;ID crosssite="Y" stoponerr="Y"&gt;CheckAmount&lt;/ID&gt;
      &lt;MSG&gt;Err_CheckAmount&lt;/MSG&gt;
      &lt;PARAM name="isIndex"&gt;&lt;/PARAM&gt;
      &lt;PARAM name="ccyIdField"&gt;&lt;/PARAM&gt;
      &lt;PARAM name="ccyListField"&gt;&lt;/PARAM&gt;
      &lt;PARAM name="ccyField"&gt;HKD&lt;/PARAM&gt;
  &lt;/RULE&gt;
  </code></pre>
  
  <p>where CheckAmount is a validator class, and take a list of parameter, so it can validate everything based the parameter.</p>
  
  <p>i noticed this issue has already been raised many years ago in the comment of below.
  <a href="https://www.mulesoft.org/jira/browse/MULE-6087" rel="nofollow noreferrer">https://www.mulesoft.org/jira/browse/MULE-6087</a></p>
  
  <p>so does mule has anything like the this?</p>
  
  <pre><code>&lt;validation:all doc:name="Validate min"&gt;
          &lt;validation:validations&gt;
              &lt;validation:custom-validator class="test.CheckVal" message="Err_CheckValue"&gt;
                  **&lt;validation:param name="CITY"&gt;HK&lt;/validation:param&gt;
                  &lt;validation:param name="MIN"&gt;20&lt;/validation:param&gt;
                  &lt;validation:param name="MAX"&gt;50&lt;/validation:param&gt;**
              &lt;/validation:custom-validator&gt;
              &lt;validation:is-false expression=""/&gt;
          &lt;/validation:validations&gt;
  &lt;/validation:all&gt;
  </code></pre>
  
  <p>So when i implement Validator interface, i can get do the validation based on the parameters.</p>
  
  <p>Thanks in advance</p>