Mip-form form components How to use mip-form form components

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.