integer
Description
Wpart responsible for handling integer values. The input passed to the server is converted to the integer Erlang type.
The rendered widget is <input type="text" ... />.
Validation
option |
format |
description |
error message |
min |
Min :: integer() |
Specifies the lower bound of the input value. If passed value is smaller than the limit, an error occurs. |
{smaller_than_min, Input} |
max |
Max :: integer() |
Specifies the upper bound of the input value. If passed value is greater than the limit, an error occurs. |
{greater_than_max, Input} |
format check |
N/A |
Checks if the passed value is in the correct format (is an integer number) |
{not_integer, Input} |
HTML meta-attributes
name |
format |
description |
Examples
Records definitions
...
{integer, [{max, 6},
{min, 1}
%% other parameters
]
},
...
HTML tag
<wpart:integer OTHER_HTML_ATTRIBUTES />
