yii2 number max, min with dot and comma validation
<p>In my script I need validate price with comma and dot and max and min value. 
This is my rule()</p>

<pre><code>return [
        [['price'], 'required', 'message' =&gt; 'Price ...'],
        [['price'], 'number', 'numberPattern' =&gt; '/^[0-9]{1,2}([\.,][0-9]{1,2})*$/',
            'message' =&gt; 'Price ...', 'max' =&gt; 25, min =&gt; '0'],
    ];
</code></pre>

<p>It works good when I put price like 25.00 (. dot) but when I put 25,01 (, comma) validate don't work. Do you have any idea how to make it work?</p>