customValidate.js 25.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596

function sfsi_validationStep2()
{
   //var class_name= SFSI(element).hasAttr('sfsi_validate');
  SFSI('input').removeClass('inputError');  // remove previous error 
  if(sfsi_validator(SFSI('input[name="sfsi_rss_display"]'),'checked'))
  {
        if(!sfsi_validator(SFSI('input[name="sfsi_rss_url"]'),'url'))
        {   showErrorSuc("error","Error : Invalid Rss url ",2);
            SFSI('input[name="sfsi_rss_url"]').addClass('inputError');
            
            return false;
        }    
  }
  
  /* validate facebook */
  if(sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_facebookPage_option"]'),'checked'))
  {
        if( !sfsi_validator(SFSI('input[name="sfsi_facebookPage_url"]'),'blank'))
        {   showErrorSuc("error","Error : Invalid Facebook page url ",2);
            SFSI('input[name="sfsi_facebookPage_url"]').addClass('inputError');
            
            return false;
        }    
  }
  
  /* validate twitter user name */
    if(sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_followme"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_twitter_followUserName"]'),'blank'))
        {   showErrorSuc("error","Error : Invalid Twitter UserName ",2);
            SFSI('input[name="sfsi_twitter_followUserName"]').addClass('inputError');
            
            return false;
        }    
  }
  /* validate twitter about page */
    if(sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_aboutPage"]'),'checked'))
  {
       
        if(!sfsi_validator(SFSI('#sfsi_twitter_aboutPageText'),'blank'))
        {   showErrorSuc("error","Error : Tweet about my page is blank ",2);
            SFSI('#sfsi_twitter_aboutPageText').addClass('inputError');
            
            return false;
        }    
  }  
  
  /* twitter validation */
    if(sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_page"]'),'checked'))
  {     
       
        if(!sfsi_validator(SFSI('input[name="sfsi_twitter_pageURL"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid twitter page Url ",2);
            SFSI('input[name="sfsi_twitter_pageURL"]').addClass('inputError');
            
            return false;
        }    
  }
  
  /* goolge validation */
    if(sfsi_validator(SFSI('input[name="sfsi_google_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_google_page"]'),'checked'))
  {     
       
        if(!sfsi_validator(SFSI('input[name="sfsi_google_pageURL"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid Google+ page Url ",2);
            SFSI('input[name="sfsi_google_pageURL"]').addClass('inputError');
            
            return false;
        }    
  }
  /* youtube validation */
    if(sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_youtube_pageUrl"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid youtube Url ",2);
            SFSI('input[name="sfsi_youtube_pageUrl"]').addClass('inputError');
            
            return false;
        }    
  }
  /* youtube validation */
    if(sfsi_validator(SFSI('input[name="sfsi_youtube_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_follow"]'),'checked'))
  {     
         if(!sfsi_validator(SFSI('input[name="sfsi_ytube_user"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid youtube user ",2);
            SFSI('input[name="sfsi_ytube_user"]').addClass('inputError');
            
            return false;
        }    
  }
    /* pinterest validation */
  if(sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_page"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_pinterest_pageUrl"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid pinterest page url ",2);
            SFSI('input[name="sfsi_pinterest_pageUrl"]').addClass('inputError');            
            return false;
        }    
  }
    /* instagram validation */
  if(sfsi_validator(SFSI('input[name="sfsi_instagram_display"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_instagram_pageUrl"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid Instagram url ",2);
            SFSI('input[name="sfsi_instagram_pageUrl"]').addClass('inputError');            
            return false;
        }    
  }
  
      /* LinkedIn validation */
  if(sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_page"]'),'checked'))
  {     
        
        if(!sfsi_validator(SFSI('input[name="sfsi_linkedin_pageURL"]'),'blank') )
        {   showErrorSuc("error","Error : Invalid LinkedIn page url ",2);
            SFSI('input[name="sfsi_linkedin_pageURL"]').addClass('inputError');            
            return false;
        }    
  }
  if(sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendBusines"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendProductId"]'),'blank') || !sfsi_validator(SFSI('input[name="sfsi_linkedin_recommendCompany"]'),'blank') )
        {   showErrorSuc("error","Error : Please Enter Product Id and Company for LinkedIn Recommendation ",2);
            SFSI('input[name="sfsi_linkedin_recommendProductId"]').addClass('inputError'); 
            SFSI('input[name="sfsi_linkedin_recommendCompany"]').addClass('inputError');  
            return false;
        }    
  }
  
  /* validate custom links */
    var er=0;
  SFSI("input[name='sfsi_CustomIcon_links[]']").each(function(){
        
		if(!sfsi_validator(SFSI(this),'blank') || !sfsi_validator(SFSI(SFSI(this)),'url') )
        {      showErrorSuc("error","Error : Please Enter a valid Custom link ",2);
               SFSI(this).addClass('inputError');  
              er=1;
        }    
     });
     if(!er) return true; else return false;
}

function sfsi_validationStep3()
{
  
  SFSI('input').removeClass('inputError');  // remove previous error  
  /* validate shuffle effect  */
  if(sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'),'checked'))
  {
        if((!sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'),'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'),'checked')) && (!sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'),'activte') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'),'checked')))
        {   showErrorSuc("error","Error : Please Chose a Shuffle option ",3);
            SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
             SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
            
            return false;
        }    
  }
  if(!sfsi_validator(SFSI('input[name="sfsi_shuffle_icons"]'),'checked') && (sfsi_validator(SFSI('input[name="sfsi_shuffle_Firstload"]'),'checked') || sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'),'checked')))
  {
      showErrorSuc("error","Error : Please check \"Shuffle them automatically\" option also ",3);
      SFSI('input[name="sfsi_shuffle_Firstload"]').addClass('inputError');
      SFSI('input[name="sfsi_shuffle_interval"]').addClass('inputError');
       return false;
  }
    
    /* validate twitter user name */
  if(sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_shuffle_interval"]'),'checked'))
  {     
        
         if(!sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'),'blank') || !sfsi_validator(SFSI('input[name="sfsi_shuffle_intervalTime"]'),'int'))
        {   showErrorSuc("error","Error : Invalid shuffle time interval",3);
            SFSI('input[name="sfsi_shuffle_intervalTime"]').addClass('inputError');
            return false;
        }    
  }
    
    return true;

}
function sfsi_validationStep4()
{
   //var class_name= SFSI(element).hasAttr('sfsi_validate');
  
  /* validate email */
  if(sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_email_countsDisplay"]'),'checked'))
  {    
        
        if(SFSI('input[name="sfsi_email_countsFrom"]:checked').val()=='manual')
        {  
          if(!sfsi_validator(SFSI('input[name="sfsi_email_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter manual counts for Email icon ",4);
                SFSI('input[name="sfsi_email_manualCounts"]').addClass('inputError');
                return false;
            }      
        }    
  }
  /* validate RSS count */
  
  if(sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_rss_countsDisplay"]'),'checked'))
  {    
          if(!sfsi_validator(SFSI('input[name="sfsi_rss_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter manual counts for Rss icon ",4);
                SFSI('input[name="sfsi_rss_countsDisplay"]').addClass('inputError');
                return false;
            }      
            
  }
  /* validate facebook */
  if(sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_facebook_countsDisplay"]'),'checked'))
  {    
        
        /*if(SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val()=='likes' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_facebook_PageLink"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter facebook page Url ",4);
                SFSI('input[name="sfsi_facebook_PageLink"]').addClass('inputError');
                return false;
            }      
        } */
        if(SFSI('input[name="sfsi_facebook_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'),'blank') && !sfsi_validator(SFSI('input[name="sfsi_facebook_manualCounts"]'),'url'))
            {   showErrorSuc("error","Error : Please Enter a valid facebook manual counts ",4);
                SFSI('input[name="sfsi_facebook_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
  }
  /* validate google */
  if(sfsi_validator(SFSI('input[name="sfsi_google_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_google_countsDisplay"]'),'checked'))
  {    
        
        if(SFSI('input[name="sfsi_google_countsFrom"]:checked').val()=='follower' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_google_api_key"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid google api key",4);
                SFSI('input[name="sfsi_google_api_key"]').addClass('inputError');
                return false;
            }      
        }
        if(SFSI('input[name="sfsi_google_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_google_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter google+ manual counts ",4);
                SFSI('input[name="sfsi_google_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
  }
  /* validate twitter */
  if(sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_twitter_countsDisplay"]'),'checked'))
  {    
        
        if(SFSI('input[name="sfsi_twitter_countsFrom"]:checked').val()=='source' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="tw_consumer_key"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid consumer key",4);
                SFSI('input[name="tw_consumer_key"]').addClass('inputError');
                return false;
            }
              
          if(!sfsi_validator(SFSI('input[name="tw_consumer_secret"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid consume secret ",4);
                SFSI('input[name="tw_consumer_secret"]').addClass('inputError');
                return false;
            } 
              
          if(!sfsi_validator(SFSI('input[name="tw_oauth_access_token"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid oauth access token",4);
                SFSI('input[name="tw_oauth_access_token"]').addClass('inputError');
                return false;
            }
          
          if(!sfsi_validator(SFSI('input[name="tw_oauth_access_token_secret"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a oAuth access token secret",4);
                SFSI('input[name="tw_oauth_access_token_secret"]').addClass('inputError');
                return false;
            }    
        }
        if(SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_twitter_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter Twitter manual counts ",4);
                SFSI('input[name="sfsi_twitter_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
        
  }
  /* validate LinkedIn */
  if(sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_linkedIn_countsDisplay"]'),'checked'))
  {    
        
        if(SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val()=='follower' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="ln_company"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid company name",4);
                SFSI('input[name="ln_company"]').addClass('inputError');
                return false;
            }
              
          if(!sfsi_validator(SFSI('input[name="ln_api_key"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid API key ",4);
                SFSI('input[name="ln_api_key"]').addClass('inputError');
                return false;
            } 
              
          if(!sfsi_validator(SFSI('input[name="ln_secret_key"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a valid secret ",4);
                SFSI('input[name="ln_secret_key"]').addClass('inputError');
                return false;
            }
          if(!sfsi_validator(SFSI('input[name="ln_oAuth_user_token"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a oAuth Access Token",4);
                SFSI('input[name="ln_oAuth_user_token"]').addClass('inputError');
                return false;
            }
         
        }
        if(SFSI('input[name="sfsi_linkedIn_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_linkedIn_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter LinkedIn manual counts ",4);
                SFSI('input[name="sfsi_linkedIn_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
        
  }
  /* validate youtube */
  if(sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_youtube_countsDisplay"]'),'checked'))
  {    
        
        if(SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val()=='subscriber' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_youtube_user"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a youtube user name",4);
                SFSI('input[name="sfsi_youtube_user"]').addClass('inputError');
                return false;
            }      
        }
        if(SFSI('input[name="sfsi_youtube_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_youtube_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter youtube manual counts ",4);
                SFSI('input[name="sfsi_youtube_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
  }
   /* validate pinterest */
  if(sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_pinterest_countsDisplay"]'),'checked'))
  {    
        
       
        if(SFSI('input[name="sfsi_pinterest_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_pinterest_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter Pinterest manual counts ",4);
                SFSI('input[name="sfsi_pinterest_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
  }
  /* validate instagram */
  if(sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_instagram_countsDisplay"]'),'checked'))
  {    
        
       
        if(SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_instagram_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter Instagram manual counts ",4);
                SFSI('input[name="sfsi_instagram_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
        if(SFSI('input[name="sfsi_instagram_countsFrom"]:checked').val()=='followers' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_instagram_User"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter a instagram user name",4);
                SFSI('input[name="sfsi_instagram_User"]').addClass('inputError');
                return false;
            }      
        }
  }
  /* validate Atthis */
  if(sfsi_validator(SFSI('input[name="sfsi_shares_countsDisplay"]'),'activte') && sfsi_validator(SFSI('input[name="sfsi_shares_countsDisplay"]'),'checked'))
  {    
        
       
        if(SFSI('input[name="sfsi_shares_countsFrom"]:checked').val()=='manual' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_shares_manualCounts"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter Share icon manual counts ",4);
                SFSI('input[name="sfsi_shares_manualCounts"]').addClass('inputError');
                return false;
            }      
        }
  }
  
  
    return true;

}

function sfsi_validationStep5()
{
   //var class_name= SFSI(element).hasAttr('sfsi_validate');
  
 
  /* validate size   */
 
        if(!sfsi_validator(SFSI('input[name="sfsi_icons_size"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",5);
            SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
            
            
            return false;
        } 
       if(parseInt(SFSI('input[name="sfsi_icons_size"]').val())>100)
        {   
            showErrorSuc("error","Error : Icons Size allow  100px maximum ",5);
            SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
            
            
            return false;
        }
       if(parseInt(SFSI('input[name="sfsi_icons_size"]').val())<=0)
        {   
            showErrorSuc("error","Error : Icons Size should be more than 0 ",5);
            SFSI('input[name="sfsi_icons_size"]').addClass('inputError');
            
            
            return false;
        }  
   /* validate spacing   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",5);
            SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
            
            
            return false;
        }
         if(parseInt(SFSI('input[name="sfsi_icons_spacing"]').val())<0)
        {   
            showErrorSuc("error","Error : Icons Spacing should be 0 or more",5);
            SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
            
            
            return false;
        }  
        
    /* icons per row  spacing   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",5);
            SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
            
            
            return false;
        }
        if(parseInt(SFSI('input[name="sfsi_icons_perRow"]').val())<=0)
        {   
            showErrorSuc("error","Error : Icons Per row should be more than 0",5);
            SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
            
            
            return false;
        }   
        
  /* validate icons effects   */      
        if(SFSI('input[name="sfsi_icons_float"]:checked').val()=="yes" && SFSI('input[name="sfsi_icons_stick"]:checked').val()=="yes")
        {   
            showErrorSuc("error","Error : Only one allow from Sticking & floating ",5);
            SFSI('input[name="sfsi_icons_float"][value="no"]').prop("checked", true);
            return false;
        }
 
    
    return true;

}

function sfsi_validationStep7()
{
   //var class_name= SFSI(element).hasAttr('sfsi_validate');
  
   /* validate border thikness   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_popup_border_thickness"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",7);
            SFSI('input[name="sfsi_popup_border_thickness"]').addClass('inputError');
            
            
            return false;
        }
 /* validate fotn size   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_popup_fontSize"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",7);
            SFSI('input[name="sfsi_popup_fontSize"]').addClass('inputError');
            
            
            return false;
        }
  /* validate pop up shown    */
 
        if(SFSI('input[name="sfsi_Shown_pop"]:checked').val()=='once' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'),'blank') && !sfsi_validator(SFSI('input[name="sfsi_Shown_popupOnceTime"]'),'url'))
            {   showErrorSuc("error","Error : Please Enter a valid pop up shown time ",7);
                SFSI('input[name="sfsi_Shown_popupOnceTime"]').addClass('inputError');
                return false;
            }      
        }
    /* validate page ids   */     
     if(SFSI('input[name="sfsi_Show_popupOn"]:checked').val()=='selectedpage' )
        {   
            
          if(!sfsi_validator(SFSI('input[name="sfsi_Show_popupOn"]'),'blank'))
            {   showErrorSuc("error","Error : Please Enter page ids with comma  ",7);
                SFSI('input[name="sfsi_Show_popupOn"]').addClass('inputError');
                return false;
            }      
        }   
        
   /* validate spacing   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_icons_spacing"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",7);
            SFSI('input[name="sfsi_icons_spacing"]').addClass('inputError');
            
            
            return false;
        }
    /* icons per row  spacing   */      
        if(!sfsi_validator(SFSI('input[name="sfsi_icons_perRow"]'),'int'))
        {   
            showErrorSuc("error","Error : Please enter a numeric value only ",7);
            SFSI('input[name="sfsi_icons_perRow"]').addClass('inputError');
            
            
            return false;
        }    
  
 
    
    return true;

}


function sfsi_validator(element,valType)
{  
	var Vurl = new RegExp("^(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&amp;%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&amp;%\$#\=~_\-]+))*$");
    //var Vurl = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;

    switch(valType) {
        case "blank"     : if(!element.val().trim()) return false; else return true;
        break;
        case "url"       : if(!Vurl.test(element.val().trim())) return false; else return true;
        break;
        case "checked"   : if(!element.attr('checked')===true) return false; else return true;
        break;
        case "activte"   : if(!element.attr('disabled')) return true; else return false;
        break;
        case "int"       : if(!isNaN(element.val())) return true; else return false;
        break;
        
       }
}