[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'MaskEdit' (#lcl)

TCustomMaskEdit.ValidateEdit

Validates the value for the edit control when an EditMask has been specified.

Declaration

Source position: maskedit.pp line 315

public procedure TCustomMaskEdit.ValidateEdit; virtual;

Description

ValidateEdit is a procedure used to validate the text for the edit control using the assigned mask. ValidateEdit uses the value in IsMasked to determine if a mask has been assigned in the control.

When IsMasked is True, the value for the control is validated. The TextIsValid method is called with the value from the Text property. If the Text is not valid, an EDBEditError exception is raised for the error condition.

When IsMasked is False, no actions are performed in the method.

ValidateEdit is used in the implementation of the DoExit method.

Errors

Raises an EDBEditError if the Text for the control is not valid. Raised with the message in SMaskEditNoMatch.

See also

TCustomMaskEdit.IsMasked

  

True if a non-empty value has been assigned to EditMask.

TCustomMaskEdit.DoExit

  

Performs actions needed when the control is exited.

TCustomMaskEdit.ValidateEdit

  

Validates the value for the edit control when an EditMask has been specified.

TMaskEdit.Text

  

Contains the value for the control.

EDBEditError

  

Exception class raised for an error in a masked edit control.

SMaskEditNoMatch


Version 4.0 Generated 2025-05-03 Home