• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form validation - i18n input

#1
[eluser]bartgrrr[/eluser]
Hi,

I've a problem with my form validation rules. The '.' and ',' can be my decimal seperator! The user must be able to enter a decimal number in both formats (e.g. 999.99 or 999,99).

My validation rules contain something like:
Code:
$config = array(
  ...
  'member/order' => array(
    array(
      'field' => 'amount',
      'label' => 'Amount',
      'rules' => 'decimal'
    ),
    ...

999.99 validates,
999,99 isn't validated with the above code fragment.

What is the best way to solve this problem?

#2
[eluser]TheFuzzy0ne[/eluser]
You can create a custom callback.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.