Support > Repository > Check the input > Character count check
ja | en

I will explain how to check the number of input characters.

The real time input check will be activated at the timing you enter beyond the specified size.(FIGS. 1 and 2)

Fig. 1 Input size not exceeded
Fig. 2 Input size exceeded

Range checkSpecify.For example, if it is 4 digits, set it to "0-9999".

In the detailed definition of the model item, set the numerical value to "Check input - Character count".

Figure 3 Specifying character count check

You can set the unit of check."Char" is the number of characters, "byte" is the number of bytes that make up the character.

When "char (warning)" and "byte (warning)" are set, if the input value exceeds the set number of characters, a warning is displayed at registration.If you click the "Save" button again, you can register.

Special notation other than numbers can be specified in this column.

How to specify Description example Description
Numbers only 5 Up to 5 characters (error if 6 characters)
- numbers -5 Same as above "Numbers only" description
Numbers - 5- Minimum 5 characters (error if 4 characters)
Number 1 - number 2 5-8 Minimum 5 characters, maximum 8 characters
Since the description "max: number" is the same as "- number", it is scheduled to be abolished in the future Wagby (R8).
Since the description "min: number" is the same as "number -", it is going to be abolished in the future Wagby (R8).

If "character count check" is not specified for the string type item, a database error will occur if input exceeding the maximum number of characters specified on the table definition is made.

For example, in the case of Oracle, "varchar2 (255 char)" is applied to the string type item by default, so the maximum number of characters is 255 characters.Therefore, by specifying a numerical value smaller than 255 for the character number check setting, database errors due to over input can be avoided.

  • This check is done in real time.(Check with JavaScript on browser.)
  • In the state of input error, you can not press the button such as "save".
  • The input item that caused an error has a background of red.This applies to text boxes or date/time list boxes.
  • If you have specified a numeric format, please also consider this and set the number of characters.(Example: When entering "," with 3 digit separator in 7 numeric input items, it is necessary to set the upper limit of the number of characters to 9 in consideration of this.)

The repository key is model/modelitem/limit.