EasyUI Forum
September 14, 2025, 07:11:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: searchbox validation  (Read 13094 times)
crosemffet
Jr. Member
**
Posts: 68



View Profile WWW Email
« on: November 30, 2012, 05:48:29 AM »

does searchbox has validation?
I'm trying:
$('#tag').searchbox({
   required:true,
   validType:'length[10,15]',
   prompt:'enter the search text',
   searcher:.....
})
and required and validType is not working....
thanks in advance for your support....
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 01, 2012, 12:19:11 AM »

The searchbox is not the form field component. It has not validation feature. If you would like to validate the input value of searchbox, get the text box object of searchbox first and then call 'validatebox' method to create your validation rules.

Code:
$('#tag').searchbox({
   prompt:'enter the search text',
   searcher:.....
}).searchbox('textbox').validatebox({
   required:true,
   validType:'length[10,15]'
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!