title: Laravel double validation regex not working
body: <p>I'm trying to validate a double with two decimals but I can't achieve that.
  This is the regex and the errors I tryied and I got:</p>
  
  <p>First try:</p>
  
  <pre><code>$validation = ['price' =&gt; 'regex:[0-9]+(\.[0-9][0-9]?)?'];
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>preg_match(): Unknown modifier '+'</p>
  </blockquote>
  
  <p>Second try:</p>
  
  <pre><code>$validation = ['price' =&gt; 'regex:[0-9]+(\.[0-9][0-9]?)?'];
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>preg_match(): Delimiter must not be alphanumeric or backslash</p>
  </blockquote>
  
  <p>Third try:</p>
  
  <pre><code>$validation = ['price' =&gt; 'regex:\d+(\.\d{2})?|\.\d{2}'];
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>preg_match(): Delimiter must not be alphanumeric or backslash</p>
  </blockquote>
  
  <p>I got all the regex from this question: <a href="https://stackoverflow.com/questions/308122/simple-regular-expression-for-a-decimal-with-a-precision-of-2">Simple regular expression for a decimal with a precision of 2</a></p>
  
  <p>What am I doing wrong? Or there is any other way to validate a double with two decimals in <code>Laravel</code>?</p>