Вход Регистрация
Файл: module-assets/admin/validation-engine/demos/demoDatepicker.html
Строк: 68
<?php
<!DOCTYPE html>
<
html>
<
head>
    <
meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <
title>JQuery Validation Engine</title>
    <
link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
    <
link rel="stylesheet" href="../css/template.css" type="text/css"/>
    <
script src="../js/jquery-1.8.2.min.js" type="text/javascript">
    </
script>
    <
script src="../js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8">
    </
script>
    <
script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8">
    </
script>

    <
link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/themes/base/jquery-ui.css">
    <
script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js"></script>
    <
script>
        
jQuery(document).ready(function(){
            
// binds form submission and fields to the validation engine
            
$( ".datepicker" ).datepicker();
            
jQuery("#formID").validationEngine();
        });
            
        
/**
        *
        * @param {jqObject} the field where the validation applies
        * @param {Array[String]} validation rules for this field
        * @param {int} rule index
        * @param {Map} form options
        * @return an error string if validation failed
        */
        
function checkHELLO(fieldrulesioptions){
            if (
field.val() != "HELLO") {
                
// this allows to use i18 for the error msgs
                
return options.allrules.validate2fields.alertText;
            }
        }
    </
script>
</
head>
<
body>
    <
p>
        <
a href="../index.html" >Back to index</a>
    </
p>
    <
p>
        
This demonstration shows how to use a datepicker with the validation engine
        
<br/>
    </
p>
    <
form id="formID" class="formular" method="post" action="">
        <
fieldset>
            <
legend>
                
Datepicker      
            
</legend>
            <
label>
                <
span>Field is required : </span>
                <
input value="" class="validate[required] text-input datepicker" type="text" name="req" id="req" />
            </
label>
            <
label>
                <
input class="submit" type="submit" value="Validate &amp; Send the form!"/><hr/>
            </
label>
        </
fieldset>
    </
form>
</
body>
</
html>
?>
Онлайн: 2
Реклама