bootstrap表单验证效果代码

代码语言:html

所属分类:验证

代码描述:bootstrap表单验证效果代码

代码标签: 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html lang="en">
<head>



    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bootstrap表单验证插件</title>

    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.3.1.min.css">
    <style>
        body {
            background-color: #fafafa;
        }

        .container {
            margin: 150px auto;
        }
    </style>
</head>

<body>

    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h1>Bootstrap表单验证插件</h1>
                <form role="form" novalidate="true">
                    <div class="form-group">
                        <label for="input-name" class="control-label">名字</label>
                        <input type="text" name="name" class="form-control" id="input-name" placeholder="名字" required="">
                        <div class="invalid-feedback"></div>
                    </div>

                    <div class="form-group">
                        <label for="input-twitter" class="control-label">微信</label>
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text">@</span>
                            </div>
                            <input type="text" name="username" class="form-control" placeholder="微信" aria-label="Username" aria-describedby="addon-wrapping" required="" pattern="^[_A-z0-9]{1,}$" maxlength="15">
                            <div class="invalid-feedback"></div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="input-email" class="control-label">Email</label>
                        <input type="email" name="email" class="form-control" id="input-email" placeholder="Email" required="" data-email="" data-email-error="Bruh, that email address is invalid.">
                        <div class="invalid-feedback"></div>
                    </div>

                    <div class="form-group">
                        <label for="input-phone" class="control-label">手机</label>
                        <input type="text" name="phone" class="form-control" id="input-phone" placeholder="手机" data-numberonly="" required="" data-numberonly-error="Only accept number.">
                        <div class="invalid-feedback"></div>
                    </div>

                    <div class="form-row">
                        <div class="col-md-6 mb-3">
                            <div class="form-group">
                                <label for="input-password">密码</label>
                                <input type="password" name="password" data-minlength="6" class="form-control" id="inpu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0