In this case, the Conversion function is set to NwaConvertOptionalDateTime to convert the string time
representation from the form field (for example, “2008-01-01”) to UNIX time (for example, 1199145600).
The Validator for the
expire_time
field is
IsValidFutureTimestamp
, which checks an
integer
argument against the
current time.
The Value Formatter is applied after validation. This may be used in situations where the validator requires the
specific type of data supplied on the form, but the stored value should be of a different type. In the
expire_time
field
example, this is not required, and so the value formatter is not used. However, if the Conversion function had not
been used, and the Validator had been set to
IsValidFutureDateTime
(which checks a
string
date/time value), then
the Value Formatter would need to be set to NwaConvertOptionalDateTime to perform the data conversion before
the form processing.
A comparison of these two approaches is shown below to illustrate the difference:
When using a Conversion or Value Format function, you will almost always have to set up a Display Function for
the form field. This function is used to perform the conversion in the reverse direction – between the internal stored
value and the value displayed in the form field.
Dell Networking W-ClearPass Guest 6.0 | Deployment Guide
Form Field Validation Processing Sequence | 167
Summary of Contents for Networking W-ClearPass Guest 6.0
Page 1: ...Dell Networking W ClearPass Guest 6 0 Deployment Guide ...
Page 12: ...12 DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 26: ...26 Use of Cookies DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 64: ...64 About SMS Guest Account Receipts DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 218: ...218 Viewing the Hotspot User Interface DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 260: ...260 Automatic Logout DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 310: ...310 Glossary DellNetworking W ClearPass Guest 6 0 Deployment Guide ...
Page 320: ...320 Index DellNetworking W ClearPass Guest 6 0 Deployment Guide ...