도움말 텍스트와 같이 모든 유효성 검사에 공통적인 속성의 setter를 포함하는 기본 DataValidationBuilder입니다. DataValadation 객체를 빌드하는 데 사용됩니다.
//Addatextitemtoaformandrequireittobeanumberwithinarange.vartextItem=form.addTextItem().setTitle('Pick a number between 1 and 100?');vartextValidation=FormApp.createTextValidation().setHelpText(“Inputwasnotanumberbetween1and100.”).requireNumberBetween(1,100).build();textItem.setValidation(textValidation);
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-22(UTC)"],[[["`DataValidationBuilder` facilitates the creation of data validation rules for form items, like ensuring a text input is a number within a specific range."],["It provides methods to set help text, which is displayed if validation fails, and ultimately builds a `DataValidation` object applied to the form item."],["Developers can utilize methods such as `requireNumberBetween()` to define specific validation criteria, and chain methods for streamlined implementation."],["The `build()` method finalizes the validation setup, generating a `DataValidation` object ready to be associated with a form item for enforcing data integrity."]]],["`DataValidationBuilder` constructs `DataValidation` objects, allowing the setting of common validation properties like help text. The `build()` method finalizes the `DataValidation` object. `copy()` duplicates the builder. `setHelpText(text)` assigns instructional text displayed when input is invalid. As illustrated, a text item can be set to only accept numbers within a defined range, displaying help text for incorrect input. This process creates validations in forms.\n"]]