EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
June 16, 2024, 04:04:47 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
textbox + validatebox to validate length
Pages: [
1
]
« previous
next »
Print
Author
Topic: textbox + validatebox to validate length (Read 8919 times)
catpaw
Jr. Member
Posts: 85
textbox + validatebox to validate length
«
on:
March 17, 2015, 07:54:56 PM »
hi, regards
before the document ready I have this:
$.extend($.fn.validatebox.defaults.rules, {
valLength: {
validator: function(value, param){
return value.length == param[0];
},
message: 'Este campo requiere {0} caracteres.'
}
});
and the I try to use:
<input name="usuario" class="easyui-textbox
validatebox
" style="width:100%;height:40px;padding:12px" data-options="prompt:'usuario',iconCls:'icon-man',iconWidth:38,required:true,
validType:'valLength[5]'
">
but nothing happens
please help
«
Last Edit: March 18, 2015, 07:00:02 AM by catpaw
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: textbox + validatebox to validate length
«
Reply #1 on:
March 18, 2015, 03:28:50 AM »
Please refer to this example
http://jsfiddle.net/y3orxz5t/
Logged
catpaw
Jr. Member
Posts: 85
Re: textbox + validatebox to validate length
«
Reply #2 on:
March 18, 2015, 07:08:42 AM »
thanks its work
my problem was this novalidate:true on the form
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...