function validateSwiftbicHTTPInput($swiftbic, $contentObjectAttribute) { if (!SwiftBic::validate($swiftbic)) { $contentObjectAttribute->setValidationError(ezpI18n::tr('kernel/classes/datatypes', 'The SWIFT - BIC code is not valid.')); return eZInputValidator::STATE_INVALID; } return eZInputValidator::STATE_ACCEPTED; }
public function testEmptySwiftBicAsInvalid() { $this->assertEquals(SwiftBic::validate(''), false); $this->assertEquals(SwiftBic::validate(' '), false); }