'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH g3x.form_f_valid @(#)form_f_valid	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/form_f_valid	1.4"
.nr X
.if \nX=0 .ds x} form_field_validation 3X "" "\&"
.if \nX=1 .ds x} form_field_validation 3X ""
.if \nX=2 .ds x} form_field_validation 3X "" "\&"
.if \nX=3 .ds x} form_field_validation "" "" "\&"
.TH \*(x}
.SH NAME
.na
\f4form_field_validation\f2: \f4 set_field_type\f1, \f4field_type\f1, \f4field_arg\f1 \- \f4forms\fP field data type validation
.ad
.SH SYNOPSIS
.nf
.ft 4
#include <form.h>
.sp
int set_field_type(FIELD *field, FIELDTYPE *type, ...);
.sp 0.5
FIELDTYPE *field_type(FIELD *field);
.sp 0.5
char *field_arg(FIELD *field);
.ft 1
.fi
.SH DESCRIPTION
\f4set_field_type\fP associates the specified field type with \f2field\f1.
Certain field types take additional arguments.
\f4TYPE_ALNUM\f1, for instance, requires one,
the minimum width specification for the field.
The other predefined field types are: \f4TYPE_ALPHA\f1,
\f4TYPE_ENUM\f1, \f4TYPE_INTEGER\f1,
\f4TYPE_NUMERIC\f1, \f4TYPE_REGEXP\f1.
.PP
\f4field_type\fP returns a pointer to the field type of \f2field\f1.
\f4NULL\fP is returned if no field type is assigned.
.PP
\f4field_arg\fP returns a pointer to the field arguments associated with
the field type of \f2field\f1.
\f4NULL\fP is returned if no field type is assigned.
.SH RETURN VALUE
\f4field_type\fP and \f4field_arg\fP return \f4NULL\fP on error.
.PP
\f4set_field_type\fP returns one of the following:
.TS
lfCWw(1.25i)1 c1 l .
E_OK	\-	The function returned successfully.
E_SYSTEM_ERROR	\-	System error.
.TE
.SH NOTES
.PP
The header file \f4<form.h>\f1 automatically includes the header files
\f4<eti.h>\fP and \f4<curses.h>\fP.
.SH SEE ALSO
\f4curses\fP(3X),
\f4forms\fP(3X).
