www.element4solution.com

e4s.html.input.extended
Interface AEP_ValidationObject_Intf

All Known Implementing Classes:
E4DBValidatorInterfaces, E4DBValidatorPackageName, E4ValidatorColor, E4ValidatorDATEFIELD, E4ValidatorEMail, E4ValidatorFileUpload, E4ValidatorFLOATFIELD, E4ValidatorID, E4ValidatorLONGFIELD, E4ValidatorNoBlanks, E4ValidatorPassword, E4ValidatorSqlName, E4ValidatorUrl

public interface AEP_ValidationObject_Intf

Interface for validation objects.

Since:
JDK 1.4
See Also:
E4InputField_Intf.setValidator(e4s.html.input.extended.AEP_ValidationObject_Intf), E4InputField_Intf.validate(), e4s.html.FORM#validate(e4s.html.E4CgiParams),

Example_FormValidator.java


Method Summary
 boolean isMandatory()
          Check, if an input field based on this validation rule requires a mandatory value.
 void setFieldset(char mode, E4Fieldset fieldset)
          This method is called before the validate(e4s.html.input.extended.E4InputFieldName_Intf,e4s.translate.E4Label_Intf,String) function is called to inform the validating object about other fields values on the screen as well as the mode (update, insert or delete).
 E4Label_Intf validate(E4InputFieldName_Intf fieldname, E4Label_Intf label, java.lang.String value)
          Validate a field during input.
 

Method Detail

isMandatory

boolean isMandatory()
Check, if an input field based on this validation rule requires a mandatory value. This means, that the user must type a value and there will be a special markup within the field's label.

Returns:
true, if mandatory
See Also:
E4InputField.isMandatory()

setFieldset

void setFieldset(char mode,
                 E4Fieldset fieldset)
This method is called before the validate(e4s.html.input.extended.E4InputFieldName_Intf,e4s.translate.E4Label_Intf,String) function is called to inform the validating object about other fields values on the screen as well as the mode (update, insert or delete). Normally, this function is not called, except during "editing" (classes in package e4s.html.editing).

Parameters:
mode - one of AEP_EditingDataDescriptor_Intf.MODE_INSERT, AEP_EditingDataDescriptor_Intf.MODE_UPDATE or AEP_EditingDataDescriptor_Intf.MODE_DELETE.
fieldset - the fieldset containing all the fields in the editing screen

validate

E4Label_Intf validate(E4InputFieldName_Intf fieldname,
                      E4Label_Intf label,
                      java.lang.String value)
                      throws java.lang.Exception
Validate a field during input.

Parameters:
fieldname - the name of the field
label - the label of the field (translated)
value - the current value the user has entered
Returns:
null, if validation is o.k. (no errors) or an error message beeingt displayed and also indicating that the validation has failed.
Throws:
java.lang.Exception

www.element4solution.com