Date: Thu, 28 Mar 2024 19:37:38 +0000 (UTC) Message-ID: <898782392.6875.1711654658154@ip-10-10-7-29.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_6874_1701036397.1711654658151" ------=_Part_6874_1701036397.1711654658151 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
See also: Writing Registry Plugins and&= nbsp;Identifier Validat= ion
FooIden=
tifierValidator
.FooIdentifierValidator
&=
nbsp;model and a corresponding controller (FooIdentifierValidatorsCon=
troller
).belongTo CoIdentifierValidator
.SIVController
.foo_identifier_validators
table will be =
created. There is no add
operation or view required.=
The skeletal row will point to the parent CO Identifier Validator.
foo_identifier_validator/foo_identifier_valid=
ators/edit/#
. This will be called immediately after the parent =
CO Identifier Validator is created.CoIdentifierValidator
has a hasO=
ne
(ie: 1 to 1) relationship with FooIdentifierValid=
ator
.foo_identifier_validators
should inclu=
de a foreign key to co_identifier_validators:id
.
foo_identif=
ier_validators:id
.Identifier Validation Plugins may determine whether or not they should b= e instantiated. An instantiated Plugin requires configuration info= rmation, such as an LDAP server to query. A non-instantiated Plugin does no= t, such as a Plugin that determines if there are any non-ASCII characters i= n the identifier.
A plugin declares whether or not it needs to be instantiated in the FooI= dentifierValidator model:
public = $cmPluginInstantiate =3D true;
If a Plugin is instantiated, then
The Plugin must implement a validation routine in the FooIdentifie=
rValidator
model, with the following signature:
public = function validate($identifier, $coIdentifierValidator, $coExtendedType, $pl= uginCfg=3Dnull)
where
$identifier
type. Corresponds to cm_co_extended_types, but f=
or Email Addresses and Identifiers only.If validate
determines the $identifier
to be a=
cceptable/valid, it returns true
. Otherwise, the function shou=
ld throw an exception in accordance with the type of error.
The message passed with the exception should be a localized string suita= ble for display to the user.