审查视图

public/assets/libs/nice-validator/demo/option-theme.html 2.5 KB
王智 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Themes</title>
    <link rel="stylesheet" href="demo.css">
</head>

<body>

<form class="form" data-validator-option="{timely:2}">
    <h3>Default theme</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <input type="password" name="password" data-rule="required;length(6~16)" placeholder="Password">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>

<form class="form" data-validator-option="{timely:2, theme:'yellow_right'}">
    <h3>Tip on right</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <input type="password" name="password" data-rule="required;length(6~16)" placeholder="Password">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>

<form class="form" data-validator-option="{timely:2, theme:'yellow_right_effect'}">
    <h3>Tip with an effect</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>

<form class="form" data-validator-option="{timely:2, theme:'yellow_top'}">
    <h3>Tip on top</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>

<form class="form" data-validator-option="{timely:2, theme:'simple_right', showOk:''}">
    <h3>Simple message on right</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>

<form class="form" data-validator-option="{timely:2, theme:'simple_bottom'}">
    <h3>Simple message on bottom</h3>
    <div class="form-item">
        <input type="text" name="user[email]" data-rule="required;email" placeholder="Email">
    </div>
    <div class="form-item">
        <button type="submit">Submit</button>
    </div>
</form>


<script src="https://cdn.jsdelivr.net/jquery/1.12.3/jquery.min.js"></script>
<script src="../dist/jquery.validator.min.js?local=en"></script>
</body>
</html>