Class ParagraphTextValidation

Paragraph Text Validation

A DataValidation for a Paragraph Text Item .

 // Add a paragraph text item to a form and require the answer to be at least 100 
 // characters. 
 const 
  
 form 
  
 = 
  
 FormApp 
 . 
 create 
 ( 
 'My Form' 
 ); 
 const 
  
 paragraphTextItem 
  
 = 
  
 form 
 . 
 addParagraphTextItem 
 (). 
 setTitle 
 ( 
 'Describe yourself:' 
 ); 
 const 
  
 paragraphtextValidation 
  
 = 
  
 FormApp 
 . 
 createParagraphTextValidation 
 () 
  
 . 
 setHelpText 
 ( 
 'Answer must be more than 100 characters.' 
 ) 
  
 . 
 requireTextLengthGreaterThanOrEqualTo 
 ( 
 100 
 ) 
  
 . 
 build 
 (); 
 paragraphTextItem 
 . 
 setValidation 
 ( 
 paragraphtextValidation 
 ); 
Create a Mobile Website
View Site in Mobile | Classic
Share by: