Title |
Content |
Type |
General |
Support layout |
Responsive,fixed-height,fill,container,fixed Document |
The required script |
Https://mipcache.bdstatic.com/static/v1/mip-form/mip-form.js |
Sample
Basic Use
<mip-form method= "POST" url= "//www.baidu.com" > <input type= "input" name= "user Name "validatetarget=" username "validatetype=" must placeholder= "name" > <div class= "Mip-form-target" target= "username" > name cannot be null </div> <input type= "input" name= "email" validatetarget= "email" Validatetype= "Email" placeholder= "mail" > <div class= "mip-form-target" target= "email" > Fill in the correct email</ div> <input type= "input" name= "phone" validatetarget= "phone" validatetype= "Telephone" placeholder= "Tel" > /p> <div class= "Mip-form-target" target= "Phone" > fill in the correct phone format </div> <input type= "input" name= " CustomNumber "validatetarget=" Custom "validatetype=" Custom "validatereg=^[0-9]*$ placeholder=" I am a custom validation rule number "> <div class= "Mip-form-target" target= "Custom" > Please enter the correct number </div> <input type= "Submit" value= "submitted" > </mip-form> |
Add Empty button
<mip-form method= "POST" url= "//xxx" clear= "true" > <input type= "input" name= "username" validatetarget= "username" validatetype= "must" placeholder= "name" > <div target= "username" > name cannot be empty </div> <input type= "input" name= "email" validatetarget= "email" validatetype= "email" placeholder= "Mail" > <div target= "Email" > Fill in the correct email</div> <input type= "Submit" value= "submitted" > </mip-form> |
Property
method
Description: Form Submission method
Required option: Yes
URL
Description: Form submission URL, equivalent to form action, requires https://or//start
Required option: Yes
Validatetarget
Note: Verify that the prompt corresponds to tag, for the corresponding error when the prompt display element search
Required option: No
Validatetype
Description: The type of validation used to support simple validation. Currently provides email, phone, idcar, custom. You need to fill in the Validatereg when you are a custom
Required option: No
Validatereg
Description: Custom validation, supplemental webmaster Personalized validation rules. If Validatetype is custom, need to fill in the corresponding validation rules
Required option: No
Clear
Note: The input empty button switch in the form
Required option: No