1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00

Merge branch 'master' of github.com:hillelcoren/invoice-ninja

This commit is contained in:
Hillel Coren 2014-04-22 18:10:55 +03:00
commit 4a7432cc41

View File

@ -512,6 +512,11 @@ class AccountController extends \BaseController {
private function savePayments()
{
Validator::extend('notmasked', function($attribute, $value, $parameters)
{
return $value != str_repeat('*', strlen($value));
});
$rules = array();
$recommendedId = Input::get('recommendedGateway_id');
@ -531,12 +536,12 @@ class AccountController extends \BaseController {
{
if(in_array($field, ['merchant_id', 'passCode']))
{
$rules[$gateway->id.'_'.$field] = 'required';
$rules[$gateway->id.'_'.$field] = 'required|notmasked';
}
}
else
{
$rules[$gateway->id.'_'.$field] = 'required';
$rules[$gateway->id.'_'.$field] = 'required|notmasked';
}
}
}