Deployment Guide

l NwaCaptchaIsValid Checks that the value matches the security code generated in the CAPTCHA image. This
validator should only be used with the standard captcha field.
l NwaGuestManagerIsValidRoleId Checks that the value is a valid role ID for the current operator and user
database.
l NwaIsValidExpireAfter Checks that the value is one of the account expiration time options specified in the
Guest Manager configuration.
l NwaIsValidLifetime Checks that the value is one of the account lifetime options specified in the Guest
Manager configuration.
Form Field Conversion Functions
The Conversion and Value Format functions that are available are listed below:
l NwaConvertOptionalDateTime Converts a string representation of a time to the UNIX time representation
(integer value). The conversion leaves blank values unmodified.
l NwaConvertOptionalInt Converts a string representation of an integer to the equivalent integer value. The
conversion leaves blank values unmodified.
l NwaConvertStringToOptions Converts a multi-line string representation of the form
key1 | value1
key2 | value2
to the array representation
array (
'key1' => 'value1',
'key2' => 'value2',
)
l NwaImplodeComma Converts an array to a string by joining all of the array values with a comma.
l NwaTrim Removes leading and trailing whitespace from a string value.
l NwaTrimAll Removes all whitespace from a string (including embedded spaces, newlines, carriage returns, tabs,
etc).
l NwaStrToUpper Formats the text string to all uppercase letters.
l NwaStrToLower Formats the text string to all lowercase letters.
l NwaNormalizePhoneNumber Removes all spaces, dashes, parenthesis and non-numerical characters from the
phone number.
Form Field Display Formatting Functions
The Display Functions that are available are listed below:
Function Description
NwaBoolFormat
Formats a Boolean value as a string.
l If the argument is 0 or 1, a 0 or 1 is returned for false and true, respectively.
l If the argument is a string containing a |” character, the string is split at the | separator and
used for false and true values.
l If the argument is an array, the 0 and 1 index values are used for false and true values.
Otherwise, the string values “false” and “true” are returned.
NwaByteFormat
Formats a non-negative size in bytes as a human readable number (bytes, KB, MB, GB, etc). 1 KB is
Table 39:
Form Field Display Functions
Dell Networking W-ClearPass Guest 6.0 | Deployment Guide Form Field Conversion Functions | 301