Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5b062234

Von Jan Büren vor 8 Monaten hinzugefügt

  • ID 5b062234de9df21b734e899312cb368507f4aad2
  • Vorgänger 34eac2fb
  • Nachfolger ed43b157

Params validierung exakter beschrieben (review sprint)

Unterschiede anzeigen:

SL/Form.pm
1504 1504
                 { isa  => 'Form'},
1505 1505
                 { type => HASHREF, callbacks => { has_yy_in_dateformat => sub { $_[0]->{dateformat} =~ m/yy/ } } },
1506 1506
                 { type => SCALAR, callbacks  => { is_fx_currency       => sub { shift ne $_[1]->[0]->{defaultcurrency} } } }, # should be ISO three letter codes for currency identification (ISO 4217)
1507
                 { type => SCALAR | HASHREF, callbacks  => { is_valid_kivi_date   => sub { shift =~ m/\d+\d+\d+/ } } }, # we have three numbers. Either DateTime or form scalar
1508
                 { type => SCALAR, callbacks  => { is_buy_or_sell_rate  => sub { shift =~ m/^buy|sell$/ } } },
1507
                 { type => SCALAR | HASHREF, callbacks  => { is_valid_kivi_date   => sub { shift =~ m/\d+.\d+.\d+/ } } }, # we have three numbers. Either DateTime or form scalar
1508
                 { type => SCALAR, callbacks  => { is_buy_or_sell_rate  => sub { shift =~ m/^(buy|sell)$/ } } },
1509 1509
                 { type => SCALAR, callbacks  => { is_current_form_id   => sub { $_[0] == $_[1]->[0]->{id} } },              optional => 1 },
1510
                 { type => SCALAR, callbacks  => { is_valid_fx_table    => sub { shift =~ m/(ar|ap)/  } }, optional => 1 }
1510
                 { type => SCALAR, callbacks  => { is_valid_fx_table    => sub { shift =~ m/^(ar|ap)$/  } }, optional => 1 }
1511 1511
              );
1512 1512
  my ($self, $myconfig, $currency, $transdate, $fld, $id, $record_table) = @_;
1513 1513

  

Auch abrufbar als: Unified diff