403Webshell
Server IP : 66.29.146.62  /  Your IP : 216.73.216.152
Web Server : LiteSpeed
System : Linux premium231.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : dokkdzvi ( 925)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/dokkdzvi/morraa-ksa.store/controlPanel/assets/plugins/parsleyjs/src/extra/validator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/dokkdzvi/morraa-ksa.store/controlPanel/assets/plugins/parsleyjs/src/extra/validator/words.js
(function () {
// minwords, maxwords, words extra validators
var countWords = function (string) {
  return string
      .replace( /(^\s*)|(\s*$)/gi, "" )
      .replace( /[ ]{2,}/gi, " " )
      .replace( /\n /, "\n" )
      .split(' ').length;
};

window.ParsleyValidator.addValidator(
	'minwords',
	function (value, nbWords) {
		return countWords(value) >= nbWords;
	}, 32)
	.addMessage('en', 'minwords', 'This value needs more words');

window.ParsleyValidator.addValidator(
	'maxwords',
	function (value, nbWords) {
		return countWords(value) <= nbWords;
	}, 32)
	.addMessage('en', 'maxwords', 'This value needs fewer words');

window.ParsleyValidator.addValidator(
	'words',
	function (value, arrayRange) {
		var length = countWords(value);
		return length >= arrayRange[0] && length <= arrayRange[1];
	}, 32)
	.addMessage('en', 'words', 'This value has the incorrect number of words');
})();

Youez - 2016 - github.com/yon3zu
LinuXploit