更新时间:2023-02-26 14:10:50
this-> Html-> css( array(' jquery.validate'));
echo
this-> Html->脚本(数组(' jquery.min.1.8.3',' jquery.validate',' jquery.validation.functions') );
?>
< script type = text / javascript >
( function (){
The regular exp in this validation is not working.how can i do this?plz help me.
<?php
echo $this->Html->css(array('jquery.validate'));
echo $this->Html->script(array('jquery.min.1.8.3','jquery.validate', 'jquery.validation.functions'));
?>
<script type="text/javascript">
$(function() {
$("#twitter").validate({
expression: "if (VAL.match(/^(http(s)?:\/\/)?(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/)) return true; else return false;",
message: "Should be a valid twitter link"
});
});
</script>
this->Html->css(array('jquery.validate')); echo
this->Html->script(array('jquery.min.1.8.3','jquery.validate', 'jquery.validation.functions')); ?>
<script type="text/javascript">
(function() {