Validates the data entered in an F_TIME field
| Call | ||
| #include <vv_time.h> | ||
| int vf_time(stp, picp, dfldp, cvbufp) | ||
|
UCHAR *stp |
Pointer to the string containing the field data |
|
| UCHAR *picp | Pointer to the picture associated with the string | |
| DFIELDPTR dfldp | Pointer to the time field to validate | |
| UCHAR *cvbufp | Pointer to conversion buffer | |
| Returns | ||
| 1 | The data is valid for this F_TIME field. | |
| 0 | The data is invalid for this F_TIME field. | |
| Description
vf_time() validates time data entered into a time field. First, the string entered in the field is reformatted to match the time format string specified in the field structure. If necessary, the string is padded with the time pad character. vf_time() does several validation checks on the formatted time string. If the data does not pass a validation check, VAL_ERR is set. The form editor will then display the appropriate message. The following table lists the validation checks and the message displayed in the error window if the check fails. |
||
| vf_time() checks for: | Message: | |
| A proper time in the specified format | INV_TIME followed by proper format | |
| A time in the range specified for the field, if any. | OUTOFRANGE | |
The checks for a proper time are:
Vermont Views validation messages are defined in vv_valmsg.c. |
||
| Related Functions
vf_bool(), vf_ch(), vf_date(), vf_dec(), vf_fill(), vf_double(), vf_int(), vf_long(), vf_req(), vf_st() |
||