Home

Requiredint

Requiredint is a term used in software design and data validation to denote an integer field that must be supplied. It is not a standard primitive in mainstream programming languages, but it appears in schema definitions, contract-first API design, and form validation frameworks as a way to express mandatory presence alongside type requirements.

Definition and semantics

A Requiredint represents an integer value that is required for a given input, object, or record. Validation

Usage and implications

In practice, declaring a field as Requiredint communicates to clients and consumers that they must provide

Examples and comparisons

An example field described as age: Requiredint implies that a payload must include age with an integer

See also

Optionalint, Integer, Data validation, API schema.

rules
associated
with
Requiredint
enforce
two
conditions:
the
field
must
be
present,
and
the
value
must
be
an
integer.
Depending
on
the
system,
the
value
may
also
have
range
constraints
(for
example,
within
the
bounds
of
a
32-bit
signed
integer),
but
the
core
requirement
is
presence
and
integer
type.
a
numeric
value
for
that
field.
Servers
or
validators
will
reject
requests
or
data
payloads
that
omit
the
field
or
supply
a
non-integer
value.
Some
frameworks
separate
presence
constraints
from
nullability;
in
such
cases,
Requiredint
typically
implies
non-null
and
non-missing,
with
no
default
value
unless
the
schema
or
API
specifies
one.
value,
such
as
25,
and
omits
any
allowance
for
missing
age.
This
contrasts
with
Optionalint,
which
permits
the
field
to
be
absent,
and
NullableInt,
which
allows
null
values
in
addition
to
integers.