@@ -643,7 +643,7 @@ private static function getValFromMultiDimInput(array &$input, $keys)
643
643
* 'ultmtcdtr','ultmtdbtr','rmtinf','orgnldbtracct_iban','iban','bic',
644
644
* 'ccy','amendment', 'btchbookg','instdamt','seqtp','lclinstrm',
645
645
* 'elctrncsgntr','reqdexctndt','purp','ctgypurp','orgnldbtragt', 'adrline'
646
- * 'ctry', 'dbtrpstladr', 'cdtrpstladr', 'pstladr'
646
+ * 'ctry', 'dbtrpstladr', 'cdtrpstladr', 'pstladr', 'orgid_id', 'orgid_sm'
647
647
* @param mixed $input
648
648
* @param array $options See `checkBIC()`, `checkIBAN()` and `checkLocalInstrument()` for
649
649
* details. In addition one can use the key `version`, which is relevant
@@ -681,6 +681,7 @@ public static function check(string $field, $input, array $options = null)
681
681
if (empty ($ input ))
682
682
return false ; // cannot be empty
683
683
case 'ultmtdbtrid ' :
684
+ case 'orgid_sm ' :
684
685
case 'orgid_id ' :
685
686
return ( self ::checkLength ($ input , self ::TEXT_LENGTH_VERY_SHORT )
686
687
&& self ::checkCharset ($ input ) )
@@ -864,10 +865,11 @@ public static function sanitizeText(int $length, string $input, bool $allowEmpty
864
865
}
865
866
866
867
/**
867
- * Tries to sanitize the the input so it fits in the field.
868
+ * Tries to sanitize the input so it fits in the field.
868
869
*
869
870
* @param string $field Valid fields are: 'ultmtcdtr', 'ultmtdbtr',
870
871
* 'orgnlcdtrschmeid_nm', 'initgpty', 'cdtr', 'dbtr', 'rmtinf', 'adrline'
872
+ * 'orgid_sm', 'orgid_id'
871
873
* @param mixed $input
872
874
* @param int $flags Flags used in replaceSpecialChars()
873
875
* @return mixed|false The sanitized input or false if the input is not sanitizeable or
@@ -878,6 +880,7 @@ public static function sanitize(string $field, $input, int $flags = 0)
878
880
$ field = strtolower ($ field );
879
881
switch ($ field ) // fall-through's are on purpose
880
882
{
883
+ case 'orgid_sm ' :
881
884
case 'orgid_id ' :
882
885
return self ::sanitizeText (self ::TEXT_LENGTH_VERY_SHORT , $ input , true , $ flags );
883
886
case 'adrline ' :
@@ -888,6 +891,7 @@ public static function sanitize(string $field, $input, int $flags = 0)
888
891
889
892
return in_array (false , $ input , true ) ? false : $ input ;
890
893
}
894
+ // fallthrough on purpose
891
895
case 'ultmtcdrt ' : // deprecated, just here for backwards compatibility
892
896
case 'ultmtcdtr ' :
893
897
case 'ultmtdbtr ' :
0 commit comments