Created
October 4, 2018 14:49
-
-
Save robozavri/d626042c218db4bb2c34b812fd1bbfea to your computer and use it in GitHub Desktop.
Laravel Form Validation For Float Values Using Regex Rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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