Password
extends Element
in package
Password Class
Create a password fields. Password fields can utilize a special validation rule called matchWith
By using the matchWith
validation, you can require that two fields (for instance 'password' and 'repeat password')
have the exact same value. As with everything in ValidForm Builder, this is validated both client-side and
server-side.
Example; Match two password fields
$objNewPassword = $objForm->addField(
"new-password",
"New Password",
ValidForm::VFORM_PASSWORD
);
$objForm->addField(
"repeat-password",
"Repeat Password",
ValidForm::VFORM_PASSWORD,
array(
// Link the fieldobject to match with
"matchWith" => $objNewPassword
),
array(
// Set an error message if the fields don't match when submitted
"matchWith" => "Password fields do not match"
)
);
Tags
Table of Contents
Methods
- addField() : Element
- getDynamicLabelMate() : array<string|int, mixed>
- getDynamicRemoveLabelMate() : array<string|int, mixed>
- getHint() : string
- getId() : string
- getLabel() : string
- getMagicMeta() : array<string|int, mixed>
- getMagicReservedMeta() : array<string|int, mixed>
- getParent() : Base
- getRequiredStyle() : string
- getReservedFieldMeta() : array<string|int, mixed>
- getReservedLabelMeta() : array<string|int, mixed>
- getReservedMeta() : array<string|int, mixed>
- getTip() : string
- getTipMeta() : array<string|int, mixed>
- getType() : int
- getValidator() : FieldValidator
- setConditions() : void
- setHint() : void
- setId() : void
- setLabel() : void
- setName() : void
- setParent() : void
- setRequiredStyle() : void
- setTip() : void
- setType() : void
- setValidator() : void
Methods
addField()
public
addField() : Element
addField($name, $type, $validationRules = array(), $errorHandlers = array(), $meta = array()) Adds another field to this field if this field is a container
Return values
ElementgetDynamicLabelMate()
public
getDynamicLabelMate() : array<string|int, mixed>
getDynamicLabelMate() Returns the value of $__dynamiclabelmeta
Return values
array<string|int, mixed>getDynamicRemoveLabelMate()
public
getDynamicRemoveLabelMate() : array<string|int, mixed>
getDynamicRemoveLabelMate() Returns the value of $__dynamicremovelabelmeta
Return values
array<string|int, mixed>getHint()
public
getHint() : string
getHint() Returns the value of $__hint
Return values
stringgetId()
public
getId() : string
getId() Returns the value of $__id
Return values
stringgetLabel()
public
getLabel() : string
getLabel() Returns the value of $__label
Return values
stringgetMagicMeta()
public
getMagicMeta() : array<string|int, mixed>
getMagicMeta() Returns the value of $__magicmeta
Return values
array<string|int, mixed>getMagicReservedMeta()
public
getMagicReservedMeta() : array<string|int, mixed>
getMagicReservedMeta() Returns the value of $__magicreservedmeta
Return values
array<string|int, mixed>getParent()
public
getParent() : Base
getParent() Returns the value of $__parent
Return values
BasegetRequiredStyle()
public
getRequiredStyle() : string
getRequiredStyle() Returns the value of $__requiredstyle
Return values
stringgetReservedFieldMeta()
public
getReservedFieldMeta() : array<string|int, mixed>
getReservedFieldMeta() Returns the value of $__reservedfieldmeta
Return values
array<string|int, mixed>getReservedLabelMeta()
public
getReservedLabelMeta() : array<string|int, mixed>
getReservedLabelMeta() Returns the value of $__reservedlabelmeta
Return values
array<string|int, mixed>getReservedMeta()
public
getReservedMeta() : array<string|int, mixed>
getReservedMeta() Returns the value of $__reservedmeta
Return values
array<string|int, mixed>getTip()
public
getTip() : string
getTip() Returns the value of $__tip
Return values
stringgetTipMeta()
public
getTipMeta() : array<string|int, mixed>
getTipMeta() Returns the value of $__tipmeta
Return values
array<string|int, mixed>getType()
public
getType() : int
getType() Returns the value of $__type
Return values
intgetValidator()
public
getValidator() : FieldValidator
getValidator() Returns the value of $__validator
Return values
FieldValidatorsetConditions()
public
setConditions() : void
setConditions(array $value) Overwrites the value of $__conditions
setHint()
public
setHint() : void
setHint(string $value) Overwrites the value of $__hint
setId()
public
setId() : void
setId(string $value) Overwrites the value of $__id
setLabel()
public
setLabel() : void
setLabel(string $value) Overwrites the value of $__label
setName()
public
setName() : void
setName(string $value) Overwrites the value of $__name
setParent()
public
setParent() : void
setParent(Base $value) Overwrites the value of $__parent
setRequiredStyle()
public
setRequiredStyle() : void
setRequiredStyle(string $value) Overwrites the value of $__requiredstyle
setTip()
public
setTip() : void
setTip(string $value) Overwrites the value of $__tip
setType()
public
setType() : void
setType(integer $value) Overwrites the value of $__type
setValidator()
public
setValidator() : void
setValidator(FieldValidator $value) Overwrites the value of $__validator