- dijit/form/ValidationTextBox
Common attributes:
required: true //cannot be empty
trim:true //The spaces before and after are automatically deleted. If there is no content added, an exception will occur when using this attribute
pattern: //Verify the regular expression, but the attribute is a string; But by default, it will be replaced with “\”. So similar: ^[1-9]\d{0,7}(\.\d{1,6})?$|^0(\.\d{1,6})?$, such an expression , If you want it to be able to verify normally, you need to adjust to: “^[1-9]\\d{0,7}(\\.\\d{1,6})?$|^0(\\ .\\d{1,6})?$”
Common methods:
isValid() //Is it compliant Check rules
isEmpty() //Is it empty
2. The difference between dijit/form/SimpleTextarea and dijit/form/Textarea
Answer: SimpleTextarea The height of the textarea will not automatically increase with the growth of the content, but the height of the Textarea can automatically increase with the growth of the content