Skip to content

Instantly share code, notes, and snippets.

@robozavri
Created October 4, 2018 14:49
Show Gist options
  • Select an option

  • Save robozavri/d626042c218db4bb2c34b812fd1bbfea to your computer and use it in GitHub Desktop.

Select an option

Save robozavri/d626042c218db4bb2c34b812fd1bbfea to your computer and use it in GitHub Desktop.
Laravel Form Validation For Float Values Using Regex Rules
$rules = array(
'pricing_value' => 'regex:/^\d*(\.\d{2})?$/'
);
regex:/^(?:d*.d{1,2}|d+)$/
'required|numeric|between:0,99.99',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment