In my Laravel 4 app, I have a form on which I need to validate numbers with comma as decimal separator. For the moment, it only work with point because my validation rule is :
public static $rules = array(
'amount' => 'numeric|min:0',
);
What‘s the best method :
- Keep the rule and replace comma with point before validation ? Is there a before_validation observer or something like this ?
- Build a custom validation rule ? french_numeric for example ?