The text box is a character

Mandatory non-empty verification:Copy the code
  1. Mandatory items are not entered — the program should prompt an error;
  2. Only a number of Spaces must be entered, no other characters – the program should prompt an error;
Field uniqueness check :(not all fields are checked, depending on the actual project situation)Copy the code
  1. Enter duplicate field values when adding – must prompt friendly message;
  2. Enter duplicate field values when modifying – friendly message must be prompted;
Field length verification:Copy the code
  1. Enter [minimum number of characters -1]– the program should prompt an error;
  2. Enter [Minimum number of characters]–OK;
  3. Enter [minimum number of characters +1]– the program should prompt success;
  4. Enter [maximum number of characters -1]–OK;
  5. Enter [maximum number of characters]–OK;
  6. Enter [maximum number of characters +1]– the program should prompt an error;
? Field is special character checkCopy the code
  1. For example, when the input field forbids certain characters, whether the restriction is successful and whether the prompt message is friendly;
  2. A combination of special characters such as Chinese characters, English characters, Spaces, digits, characters, underscores (_), and single quotation marks (‘).
  3. All special characters must be tested
? Field for special code verification:Copy the code
  1. Enter the HTM code: for example, “Hello”; The code must be displayed as text.
  2. Enter JavaScript code: for example; The code must be displayed as text.

Multi-line text box input:

  1. Whether carriage return line feeds are allowed
  2. Save and then display the format that preserves the input
  3. Enter enter for line feed to check whether it can be saved correctly. If yes, view the result. If no, check whether a correct message is displayed
  4. Check whether it can be saved correctly; If yes, view the result. If no, check whether a correct message is displayed.
Boundary value:Copy the code
  1. Enter [minimum -1]– the program should prompt an error;
  2. Enter [minimum]–OK;
  3. Enter [maximum]–OK;
  4. Enter [maximum +1]– the program should prompt an error;
Digits:Copy the code
  1. Input [limit number]–OK;
  2. Input [limit number +1]– depending on the actual project, whether to automatically round to limit number, or prompt message;
  3. Enter [limit number -1]–OK;
? Outliers, special values:Copy the code
  1. Input non-numeric data: Chinese characters, letters, characters – the program should prompt an error;
  2. Input negative numbers – depending on the actual project, if negative numbers are not allowed, a friendly message must be prompted;
  3. If non-numeric data is not allowed to be input directly, use the “Paste” and “copy” functions to try input and test whether it can be submitted and saved normally. Special characters that can be input only by the “paste” and “copy” methods cannot be saved and corresponding prompts should be provided.
  4. Full-corner digits and half-corner digits: Full-corner digits cannot be saved, a friendly message is displayed, and half-corner digits are saved normally.
  5. Values with zero as the first digit: for example, 01 = 1– depending on the actual project;

The original link