guides:o4w:o4w_api:o4wvalidatestyle

O4WValidateStyle routine

(Deprecated in O4W 1.1) Marks the control or element as requiring validation.

O4WValidateStyle(styleName, validationType, bRequired, errMsg, opt1, opt2, bServerOnly)

The function has the following parameters:

ParameterDescription
validationTypeValidation types include:

Date - Sets the validation style to a date style.
Time - Sets the validation style to a time style
SS - Sets the validation to a Social Security Number style.
CC - Sets the validation to a Credit Card Number
Zip - Sets the validation to a Zip code. This should be a valid US/Canadian postal code.
Phone - Sets the validation to a Phone number.
Num - Sets the validation to a numeric value.
Alpha - Sets the validation to an alphabetic value.
AlphaNum - Sets the validation to an alphanumeric value.
State - Sets the validation to a US State.
Range - Sets the validation to a minimum/maximum range.
Length - Sets the validation to a minimum/maximum length.
Email - Sets the validations to an email address.
DateRange - Sets the validation to a minimum/maximum date range.
bRequiredBoolean. If set to True (1) then the element is marked as required and will not accept a Null value.
errMsg<Optional> The message to be displayed of the validation fails.
opt1This parameter is optional based upon the validationType specified.

When RANGE, LENGTH or DATERANGE is specified, OPT1 should contain the minimum value to validate.



Note: The value should be in internal format when DATERANGE is specified.
opt2This parameter is optional based upon the validationType specified.

When RANGE, LENGTH or DATERANGE is specified, OPT2 should contain the maximum value to validate.



Note: The value should be in internal format when DATERANGE is specified.
bServerOnlyBoolean. If set to True (1) then the validation will occur only on the host.



By default, validations will occur on both the client, and then again on the host (client-side validation should NEVER be used alone);
  • guides/o4w/o4w_api/o4wvalidatestyle.txt
  • Last modified: 2024/06/19 20:19
  • by 127.0.0.1