Support > Repository > Check the input > Character count check

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

Specify range check.For example, in case of 4 digits please set "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
Although a description method "max: number" was also prepared, it is the same as "-number", so it will be abolished in the future Wagby (R8).
Although a description method "min: number" was also prepared, it is the same as "number -", so it is scheduled 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 a three digit separator in a 7-digit numerical value input item, it is necessary to set the upper limit of the number of characters 9 to 9 in consideration of this.)
  • It is not possible to check inputs for items that are not input targets.Specifically, it is an item which is obtained by calculation formulas, read-only item, reference linking item.

Use with regular expressions

Character count checks are expanded internally into regular expressions.For example, if the number of characters is set to 4, the regular expression ". {0, 4}" is set. That is, regexp setting is invalid.

When using character count check and regular expression together, do not specify the number of characters check, please set up expressions that also double check the number of characters in regular expressions.

Therefore, if you set character number check to numeric type, you can also enter non-numeric characters.In case of numeric type, please specify by specifying range check instead of number of characters.

The repository key is model/modelitem/limit.