<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">function getAnatelRange(){var dataFile="//jsuol.com.br/bk/dataFiles/validation/anatelCellphone.js";var file=window.location.protocol+dataFile+"?ts="+new Date().getTime();var fileref=document.createElement("script");fileref.async=true;fileref.type="text/javascript";fileref.src=file;document.getElementsByTagName("head")[0].appendChild(fileref);}var window=window||undefined;var document=document||undefined;if(window!==undefined&amp;&amp;document!==undefined){getAnatelRange();}var UOL=UOL||{};UOL.platform=UOL.platform||{};UOL.platform.fields=UOL.platform.fields||{};UOL.platform.utils=function(){function ErrorMessage(error){this.code=error.code;this.error="uol.platform.fields.error."+error.error;this.field=error.field;this.message=error.message;return this;}function getDigits(str){return this.replaceAll(str,/\D/,"");}function replaceAll(str,search,substitute){while(this.isSearchPresent(str,search)){str=str.replace(search,substitute);}return str;}function isSearchPresent(str,search){if(search instanceof String){return(str.indexOf(search)!=-1);}else{return search.test(str);}}function isBlank(text){if(!this.isNull(text)){var regex=/^\s{1,}$/;return this.trim(text)===""||regex.test(text);}return true;}function isTextMoreThan(text,size){return text.length&gt;size;}function isTextLessThan(text,size){return text.length&lt;size;}function trim(text){return text.replace(/^\s+|\s+$/g,"");}function isUndefined(value){if(typeof value==="undefined"){return true;}else{return false;}}function isNull(text){var flag=true;if(isUndefined(text)){flag=true;}else{if(text!==null){flag=false;}}return flag;}function isEmpty(object){if(this.isUndefined(object)||this.isNull(object)||this.isBlank(object)){return true;}else{return false;}}function isNumeric(text){var regex=/^\d{1,}$/;return regex.test(text);}function stringLength(text){return text.length;}function isValidEmail(str){var regex=/^[a-zA-Z0-9.!#$%&amp;'*+\/=?^_`{|}~-]+@(?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/;return regex.test(str);}function isStringContainsSubstring(subStr,str){var subStrLower=subStr.toLowerCase(),strLower=str.toLowerCase(),regex=new RegExp(subStrLower);return regex.test(strLower);}function firstCharIsLetterOrDigit(str){if(str.match(/^[a-z0-9\u00C0-\u00FF]/i)){return true;}else{return false;}}function lastCharIsLetterOrDigit(str){if(str.match(/[a-z0-9\u00C0-\u00FF]$/i)){return true;}else{return false;}}function hasTabCharacter(str){if(str.match(/\t/g)){return true;}else{return false;}}function hasTwoConsecutiveSpaces(str){if(str.match(/\s\s/g)){return true;}else{return false;}}function hasAnySpecialChar(str){if(str.match(/[^\w\s\u00C0-\u00FF]/g)){return true;}else{return false;}}function hasNoAllowedCharsForCorporate(str){if(str.match(/[^\w\s\u00C0-\u00FF\/\-\.]/g)){return true;}else{return false;}}function hasTwoNames(str){if(str.match(/[\w\u00C0-\u00FF]+(\s[\w\u00C0-\u00FF]+)+/gi)){return true;}else{return false;}}function hasLetters(str){if(str.match(/[a-zA-Z\u00C0-\u00FF]/g)){return true;}else{return false;}}return{ErrorMessage:ErrorMessage,trim:trim,isBlank:isBlank,isNull:isNull,isUndefined:isUndefined,stringLength:stringLength,isValidEmail:isValidEmail,isStringContainsSubstring:isStringContainsSubstring,isNumeric:isNumeric,isTextMoreThan:isTextMoreThan,isTextLessThan:isTextLessThan,getDigits:getDigits,replaceAll:replaceAll,isSearchPresent:isSearchPresent,isEmpty:isEmpty,firstCharIsLetterOrDigit:firstCharIsLetterOrDigit,lastCharIsLetterOrDigit:lastCharIsLetterOrDigit,hasTabCharacter:hasTabCharacter,hasTwoConsecutiveSpaces:hasTwoConsecutiveSpaces,hasAnySpecialChar:hasAnySpecialChar,hasNoAllowedCharsForCorporate:hasNoAllowedCharsForCorporate,hasTwoNames:hasTwoNames,hasLetters:hasLetters};}();UOL.platform.utils.creditCardUtils=function(){var utils=UOL.platform.utils;var MODULO_10=10;var TO_LEFT="TO_LEFT";var TO_RIGHT="TO_RIGHT";var moduleCommomProperties={moduleNumber:MODULO_10,weight:"21",direction:"TO_LEFT"};var properties={visa:{brand:"visa",cvv:{minSize:3,maxSize:4},number:{minSize:13,maxSize:16},prefix:["4"],module:moduleCommomProperties},mastercard:{brand:"mastercard",cvv:{minSize:3,maxSize:4},number:{minSize:16,maxSize:16},prefix:["5"],module:moduleCommomProperties},amex:{brand:"amex",cvv:{minSize:3,maxSize:4},number:{minSize:15,maxSize:15},prefix:["34","37"],module:moduleCommomProperties},diners:{brand:"diners",cvv:{minSize:3,maxSize:4},number:{minSize:14,maxSize:16},prefix:["36","38","300","301","302","303","304","305","306","307"],module:moduleCommomProperties},hipercard:{brand:"hipercard",cvv:{minSize:3,maxSize:4},number:{minSize:13,maxSize:16},prefix:["4"],module:moduleCommomProperties}};function getBrandProperties(brand){switch(brand){case"visa":return properties.visa;case"mastercard":return properties.mastercard;case"amex":return properties.amex;case"diners":return properties.diners;case"hipercard":return properties.hipercard;default:return new utils.ErrorMessage({code:4001499,error:"creditcard_brand_invalid"});}}function isValidPrefix(number,properties){var isValid=false;var prefixNumber=0;var prefixArray=properties.prefix;for(var i=0;i&lt;prefixArray.length;i++){prefixNumber=number.substr(0,prefixArray[i].length);if(prefixArray[i]==prefixNumber){isValid=true;}}return isValid;}function isValidNumberSize(number,propertyNumber){if(number.length&gt;propertyNumber.maxSize){return false;}if(number.length&lt;propertyNumber.minSize){return false;}return true;}function isValidCVV(cvvNumber,properties){if(utils.isBlank(cvvNumber)){return false;}if(!utils.isNumeric(cvvNumber)){return false;}if(isValidNumberSize(cvvNumber,properties.cvv)){return true;}return false;}function isValidCreditcard(number,properties){if(utils.isBlank(number)){return false;}if(!utils.isNumeric(number)){return false;}if(isValidNumberSize(number,properties.number)){return true;}return false;}function isValidModule(brand,number){var isValid=true;var brandProperties=getBrandProperties(brand);var module=brandProperties.module.moduleNumber;var weight=brandProperties.module.weight;var direction=brandProperties.module.direction;var returnCalculate=calculateModule(number,module,weight,direction);var digitVerification=number.substr(number.length-1);if(returnCalculate==0){if(digitVerification!=0){isValid=false;}}else{if((module-returnCalculate)!=digitVerification){isValid=false;}}if(!isValid){return new utils.ErrorMessage({code:4001415,error:"creditcard_module_invalid",field:"number",message:"Cartão de Credito invalido"});}}function calculateModule(number,module,weight,direction){var isSomaAlgarismo=(module==MODULO_10);var product=calculateProduct(number.substr(0,number.length-1),weight,direction,false,isSomaAlgarismo);return product%module;}function calculateProduct(number,weight,direction,isProductRemoveTen,isSomaAlgarismo){var j=0;var product=0;if(direction==TO_LEFT){for(var i=number.length-1;i&gt;=0;i--){product=calculateProductNumber(i,j,product,number,weight,isProductRemoveTen,isSomaAlgarismo);j++;if(j==weight.length){j=0;}}}else{if(direction==TO_RIGHT){for(var i=0;i&lt;number.length;i++){product=calculateProductNumber(i,j,product,number,weight,isProductRemoveTen,isSomaAlgarismo);j++;if(j==weight.length){j=0;}}}else{return false;}}return product;}function calculateProductNumber(index_i,index_j,product,number,weight,isProductRemoveTen,isSomaAlgarismo){if(isSomaAlgarismo){var soma=(parseInt(number.charAt(index_i))*parseInt(weight.charAt(index_j))).toString();for(var k=0;k&lt;soma.length;k++){product+=parseInt(soma.charAt(k));}}else{product+=(parseInt(number.charAt(index_i))*parseInt(weight.charAt(index_j)));}return product;}return{isValidCreditcard:isValidCreditcard,isValidCVV:isValidCVV,isValidPrefix:isValidPrefix,isValidModule:isValidModule,getBrandProperties:getBrandProperties};}();UOL.platform.utils.dateUtils=function(){var utils=UOL.platform.utils;var dateGroups=/^([0-9]{2})([0-9]{2})([0-9]{4})$/;function check(date){if(utils.isEmpty(date)){return new utils.ErrorMessage({code:4000901,error:"date_null",field:"date",message:"Por favor, informe uma data."});}if(!date.match(dateGroups)){return new utils.ErrorMessage({code:4000902,error:"date_not_in_correct_format",field:"date",message:"Por favor, informe a data no formato correto."});}var matchRegex=date.match(dateGroups);var day=matchRegex[1];var month=matchRegex[2];var year=matchRegex[3];day=parseInt(day,10);month=parseInt(month,10);year=parseInt(year,10);var dateObject=new Date(year,month-1,day,12);if((dateObject.getMonth()+1!==month)||(dateObject.getDate()!==day)||(dateObject.getFullYear()!==year)){return new utils.ErrorMessage({code:4000903,error:"date_does_not_exist",field:"date",message:"Por favor, informe dia, mês e ano existentes."});}}function yearsBetweenDates(dateOne,dateTwo){var result=dateTwo.getFullYear()-dateOne.getFullYear();dateOne.setFullYear(dateTwo.getFullYear());if(dateOne&gt;dateTwo){result-=1;}return result;}function checkWithMaxAge(date,maxAge){var error=check(date);if(error!==undefined){return error;}var matchRegex=date.match(dateGroups);var day=matchRegex[1];var month=matchRegex[2];var year=matchRegex[3];day=parseInt(day,10);month=parseInt(month,10);year=parseInt(year,10);var informedDate=new Date(year,month-1,day);var now=new Date();var yearsDifference=yearsBetweenDates(informedDate,now);maxAge=parseInt(maxAge,10);if(yearsDifference&gt;=maxAge){return new utils.ErrorMessage({code:4000905,error:"date_too_old",field:"date",message:"Por favor, informe uma data mais atual."});}if(yearsDifference&lt;0){return new utils.ErrorMessage({code:4000906,error:"date_too_future",field:"date",message:"Por favor, informe uma data inferior a data atual."});}}return{check:check,checkWithMaxAge:checkWithMaxAge};}();UOL.platform.utils.debitAccountUtils=function(){var utils=UOL.platform.utils;function isValidSize(value,maxsize){if(value.length&lt;=maxsize){return true;}return false;}function isZero(value){if(parseInt(value,10)===0){return true;}return false;}function checkBasics(toBeChecked,restrictions){if(utils.isEmpty(toBeChecked.value)){if(restrictions.canBeEmpty){return null;}else{return new utils.ErrorMessage({code:4001601,error:toBeChecked.name+"_empty",field:toBeChecked.name,message:"Por favor, informe o "+toBeChecked.prettyName+"."});}}toBeChecked.value=utils.trim(toBeChecked.value);if(!utils.isEmpty(restrictions.additionalChars)){if(!utils.isNumeric(toBeChecked.value)&amp;&amp;!toBeChecked.value.match(restrictions.additionalChars)){return new utils.ErrorMessage({code:4001602,error:toBeChecked.name+"_invalid_chars",field:toBeChecked.name,message:"Por favor, informe apenas caracteres válidos."});}}else{if(!utils.isNumeric(toBeChecked.value)){return new utils.ErrorMessage({code:4001603,error:toBeChecked.name+"_not_numeric",field:toBeChecked.name,message:"Por favor, informe apenas números."});}}if(!isValidSize(toBeChecked.value,restrictions.maxsize)){return new utils.ErrorMessage({code:4001604,error:toBeChecked.name+"_wrong_size",field:toBeChecked.name,message:"Por favor, informe apenas os dígitos que pertencem ao "+toBeChecked.prettyName+"."});}if(!restrictions.canBeZero&amp;&amp;isZero(toBeChecked.value)){return new utils.ErrorMessage({code:4001605,error:toBeChecked.name+"_zero",field:toBeChecked.name,message:"O "+toBeChecked.prettyName+" não pode ser zero."});}return null;}function calculateProduct(number,weight,direction,sumDigit,productRemoveTen){number=utils.trim(number);var product=0;var weightIndex=0;if(direction==="TO_LEFT"){for(var numberIndexLeft=number.length-1;numberIndexLeft&gt;=0;numberIndexLeft--){if(sumDigit){var sumLeft=parseInt(number.charAt(numberIndexLeft),10)*parseInt(weight.charAt(weightIndex),10);if(productRemoveTen){if((sumLeft+"").length&gt;1){sumLeft=sumLeft%10;}}for(var sumIndexLeft=0;sumIndexLeft&lt;(sumLeft+"").length;sumIndexLeft++){product+=parseInt((sumLeft+"").charAt(sumIndexLeft),10);}}else{product+=parseInt(number.charAt(numberIndexLeft),10)*parseInt(weight.charAt(weightIndex),10);}weightIndex++;if(weightIndex===weight.length){weightIndex=0;}}}else{if(direction==="TO_RIGHT"){for(var numberIndexRight=0;numberIndexRight&lt;number.length;numberIndexRight++){if(sumDigit){var sumRight=number.charAt(numberIndexRight)*weight.charAt(weightIndex);if(productRemoveTen){if((sumRight+"").length&gt;1){sumRight=sumRight%10;}}for(var sumIndexRight=0;sumIndexRight&lt;(sumRight+"").length;sumIndexRight++){product+=parseInt((sumRight+"").charAt(sumIndexRight),10);}}else{product+=parseInt(number.charAt(numberIndexRight),10)*parseInt(weight.charAt(weightIndex),10);}weightIndex++;if(weightIndex===weight.length){weightIndex=0;}}}}return product;}function completeNumber(number,charToAdd,totalSize,before){number=utils.trim(number);var endNumber=number;while(endNumber.length!==totalSize){if(before){endNumber=charToAdd+endNumber;}else{endNumber+=charToAdd;}}return endNumber;}return{checkBasics:checkBasics,calculateProduct:calculateProduct,completeNumber:completeNumber};}();UOL.platform.fields.debitAccountBB=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){accountDigit=accountDigit.toUpperCase();var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true,"additionalChars":"X"};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":8,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true,"additionalChars":"X"};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var completeAccountNumber=debitAccountUtils.completeNumber(accountNumber,"0",9,true);var product=debitAccountUtils.calculateProduct(completeAccountNumber,"123456789","TO_RIGHT",false,false);var module=product%11;if(module===10&amp;&amp;accountDigit==="X"){return null;}if(module===parseInt(accountDigit,10)){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountBanrisul=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(errorCode,msg,field){return new utils.ErrorMessage({code:errorCode,error:"accountNumber_invalid",field:field,message:msg});}function validateBranch(branchNumber,branchDigit){var productX=debitAccountUtils.calculateProduct(branchNumber,"212121","TO_LEFT",true,false);productX=productX%10;if(productX!==0){productX=Math.abs(productX-10);}var branchWithX=branchNumber+""+productX;var productY=debitAccountUtils.calculateProduct(branchWithX,"234567234","TO_LEFT",false,false);var module=productY%11;if(module===1){if(productX===9){productX=0;}else{productX=productX+1;}branchWithX=branchNumber+""+productX;productY=debitAccountUtils.calculateProduct(branchWithX,"234567234","TO_LEFT",false,false);module=productY%11;}if(module===0){productY=0;}else{productY=Math.abs(11-module);}var generatedBranch=productX+""+productY;branchWithX=branchNumber+""+productX;if(branchDigit===generatedBranch){return null;}return checkError(4001608,"Por favor, informe uma agência válida.","branchDigit");}function validateAccountAndBranch(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":9,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var product=debitAccountUtils.calculateProduct(accountNumber,"234567423","TO_LEFT",false,false);var module=product%11;if(module===0&amp;&amp;parseInt(accountDigit,10)===0){return null;}if(module===1&amp;&amp;parseInt(accountDigit,10)===6){return null;}if(11-module===parseInt(accountDigit,10)){return null;}return checkError(4001606,"Por favor, informe dados válidos.","accountNumber");}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var accountValidation=validateAccountAndBranch(branchNumber,branchDigit,accountNumber,accountDigit);if(accountValidation){return accountValidation;}return null;}return{validate:validate};}();UOL.platform.fields.debitAccountBradesco=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true,"additionalChars":"P"};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":7,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true,"additionalChars":"P"};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var productAccount=debitAccountUtils.calculateProduct(accountNumber,"234567","TO_LEFT",false,false);var moduleAccount=productAccount%11;var accountValid=false;if(moduleAccount===1){if(accountDigit==="P"||parseInt(accountDigit,10)===0){accountValid=true;}}else{if(moduleAccount===0){if(parseInt(accountDigit,10)===0){accountValid=true;}}else{if(11-moduleAccount===parseInt(accountDigit,10)){accountValid=true;}}}var productBranch=debitAccountUtils.calculateProduct(branchNumber,"234567","TO_LEFT",false,false);var moduleBranch=productBranch%11;var branchValid=false;if(moduleBranch===1){if(branchDigit==="P"){branchValid=true;}}else{if(moduleBranch===0){if(parseInt(branchDigit,10)===0){branchValid=true;}}else{if(11-moduleBranch===parseInt(branchDigit,10)){branchValid=true;}}}if(branchValid&amp;&amp;accountValid){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountCEF=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var code=accountNumber.substring(0,3);accountNumber=accountNumber.substring(3);var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":8,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}accountNumber=debitAccountUtils.completeNumber(accountNumber,"0",8,true);toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}if(code.match(/001|002|003|013/)){var product=debitAccountUtils.calculateProduct(branchNumber+code+accountNumber,"23456789","TO_LEFT",false,false);var module=(product*10)%11;if(module===10){if(parseInt(accountDigit,10)===0){return null;}}if(module===parseInt(accountDigit,10)){return null;}}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountHSBC=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function accountDigitSizeError(){return new utils.ErrorMessage({code:4001607,error:"accountDigit_invalidLength",field:"accountDigit",message:"Por favor, informe 2 dígitos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":6,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":2,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}if(accountDigit.length===2){accountNumber+=accountDigit.substring(0,accountDigit.length-1);accountDigit=accountDigit.substring(accountDigit.length-1);}else{return accountDigitSizeError();}var product=debitAccountUtils.calculateProduct(branchNumber+accountNumber,"98765432","TO_LEFT",false,false);var module=product%11;if((module===0||module===10)&amp;&amp;parseInt(accountDigit,10)===0){return null;}if(module===parseInt(accountDigit,10)){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountItau=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":1,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":5,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var completeBranchNumber=debitAccountUtils.completeNumber(branchNumber,"0",4,true);var completeAccountNumber=debitAccountUtils.completeNumber(accountNumber,"0",5,true);var product=debitAccountUtils.calculateProduct(completeBranchNumber+completeAccountNumber,"21","TO_LEFT",true,false);var module=product%10;if(module===0){module=10;}if(parseInt(accountDigit,10)===(10-module)){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountMercantil=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":8,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var completeBranchNumber=debitAccountUtils.completeNumber(branchNumber,"0",4,true);var completeAccountNumber=debitAccountUtils.completeNumber(accountNumber,"0",8,true);var product=debitAccountUtils.calculateProduct(completeBranchNumber+completeAccountNumber,"21","TO_LEFT",true,false);var module=product%10;accountDigit=accountDigit.toUpperCase();if(module===0&amp;&amp;parseInt(accountDigit,10)===0){return null;}if(10-module===parseInt(accountDigit,10)){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.debitAccountSantander=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;function checkError(){return new utils.ErrorMessage({code:4001606,error:"accountNumber_invalid",field:"accountNumber",message:"Por favor, informe dados válidos."});}function validate(branchNumber,branchDigit,accountNumber,accountDigit){var toBeChecked={"value":branchNumber,"name":"branchNumber","prettyName":"número da agência"};var restrictions={"canBeEmpty":false,"maxsize":4,"canBeZero":false};var branchNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchNumberCheck!==null){return branchNumberCheck;}toBeChecked={"value":branchDigit,"name":"branchDigit","prettyName":"dígito da agência"};restrictions={"canBeEmpty":true,"maxsize":2,"canBeZero":true};var branchDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(branchDigitCheck!==null){return branchDigitCheck;}toBeChecked={"value":accountNumber,"name":"accountNumber","prettyName":"número da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":8,"canBeZero":false};var accountNumberCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountNumberCheck!==null){return accountNumberCheck;}toBeChecked={"value":accountDigit,"name":"accountDigit","prettyName":"dígito da conta corrente"};restrictions={"canBeEmpty":false,"maxsize":1,"canBeZero":true};var accountDigitCheck=debitAccountUtils.checkBasics(toBeChecked,restrictions);if(accountDigitCheck!==null){return accountDigitCheck;}var newBranchNumber=branchNumber+"00";var product=debitAccountUtils.calculateProduct(newBranchNumber+accountNumber,"97310097131973","TO_RIGHT",true,true);var module=product%10;var checkBanespa=0;if(module!==0){checkBanespa=10-module;}if(checkBanespa===parseInt(accountDigit,10)){return null;}return checkError();}return{validate:validate};}();UOL.platform.fields.acreStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==13){return false;}var firstDigitWeights=[4,3,2,9,8,7,6,5,4,3,2];var secondDigitWeights=[5,4,3,2,9,8,7,6,5,4,3,2];if(checkNumber[0]==="0"&amp;&amp;checkNumber[1]==="1"){var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[11])){var calcSecondDigit=calcSum(secondDigitWeights,checkNumber);var secondDigit=11-(calcSecondDigit%11);if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(checkNumber[12])){return true;}}}return false;}return{validate:validate};}();UOL.platform.fields.alagoasStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}if(checkNumber[0]==="2"&amp;&amp;checkNumber[1]==="4"){var calcFirstDigit=calcSum(standardWeights,checkNumber);var firstDigit=(calcFirstDigit*10)%11;if(firstDigit===10){firstDigit=0;}if(firstDigit===parseInt(checkNumber[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.amapaStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}var valueToSum;var checkerDigitAP;var checkRange=checkNumber.slice(0,checkNumber.length-1);checkRange=parseFloat(checkRange.join(""));if(checkRange&gt;=3000001&amp;&amp;checkRange&lt;=3017000){valueToSum=5;checkerDigitAP=0;}if(checkRange&gt;=3017001&amp;&amp;checkRange&lt;=3019022){valueToSum=9;checkerDigitAP=1;}if(checkRange&gt;=3019023){valueToSum=0;checkerDigitAP=0;}if(checkNumber[0]==="0"&amp;&amp;checkNumber[1]==="3"){var calcFirstDigit=calcSum(standardWeights,checkNumber);calcFirstDigit+=valueToSum;var firstDigit=11-(calcFirstDigit%11);if(firstDigit===10){firstDigit=0;}if(firstDigit===11){firstDigit=checkerDigitAP;}if(firstDigit===parseInt(checkNumber[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.bahiaStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(number,checkNumber,standardWeights){if(number.length!==8&amp;&amp;number.length!==9){return false;}var firstDigitWeights;var secondDigitWeights;if(number.length===8){firstDigitWeights=[8,7,6,5,4,3,2];secondDigitWeights=[7,6,5,4,3,2];}if(number.length===9){firstDigitWeights=standardWeights;secondDigitWeights=[8,7,6,5,4,3,2];}checkNumber=checkNumber.slice(0,checkNumber.length-2);var calcFirstDigit;var firstDigit;var calcSecondDigit;var secondDigit;if(checkNumber[0]==="6"||checkNumber[0]==="7"||checkNumber[0]==="9"){calcSecondDigit=calcSum(secondDigitWeights,checkNumber);secondDigit=11-(calcSecondDigit%11);if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(number[number.length-1])){checkNumber.push(secondDigit);calcFirstDigit=calcSum(firstDigitWeights,checkNumber);firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}}}else{calcSecondDigit=calcSum(secondDigitWeights,checkNumber);secondDigit=10-(calcSecondDigit%10);if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(number[number.length-1])){checkNumber.push(secondDigit);calcFirstDigit=calcSum(firstDigitWeights,checkNumber);firstDigit=10-(calcFirstDigit%10);if(firstDigit&gt;9){firstDigit=0;}}}if(firstDigit===parseInt(number[number.length-2])&amp;&amp;secondDigit===parseInt(number[number.length-1])){return true;}return false;}return{validate:validate};}();UOL.platform.fields.commonStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}var calcFirstDigit=calcSum(standardWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(parseInt(checkNumber[8])===firstDigit){return true;}return false;}return{validate:validate};}();UOL.platform.fields.dfStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==13){return false;}var firstDigitWeights=[4,3,2,9,8,7,6,5,4,3,2];var secondDigitWeights=[5,4,3,2,9,8,7,6,5,4,3,2];if(checkNumber[0]==="0"&amp;&amp;checkNumber[1]==="7"){var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[11])){var calcSecondDigit=calcSum(secondDigitWeights,checkNumber);var secondDigit=11-(calcSecondDigit%11);if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(checkNumber[12])){return true;}}}return false;}return{validate:validate};}();UOL.platform.fields.goiasStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(number,checkNumber,standardWeights){if(number.length!==9){return false;}var checkerDigitGO;if(checkNumber[0]==="1"&amp;&amp;(checkNumber[1]==="0"||checkNumber[1]==="1"||checkNumber[1]==="5")){var calcFirstDigit=calcSum(standardWeights,checkNumber);calcFirstDigit=calcFirstDigit%11;var firstDigit;if(calcFirstDigit===0){firstDigit=0;}if(calcFirstDigit===1){checkNumber.pop();checkerDigitGO=checkNumber.join("");if(parseInt(checkerDigitGO)===11094402){if(parseInt(number[8])===0||parseInt(number[8])===1){return true;}}if(parseInt(checkerDigitGO)&gt;=10103105&amp;&amp;parseInt(checkerDigitGO)&lt;=10119997){firstDigit=1;}else{firstDigit=0;}}if(calcFirstDigit&gt;1){firstDigit=11-calcFirstDigit;}if(firstDigit===parseInt(number[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.maranhaoStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}if(checkNumber[0]==="1"&amp;&amp;checkNumber[1]==="2"){var calcFirstDigit=calcSum(standardWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.matoGrossoSulStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}if(checkNumber[0]==="2"&amp;&amp;checkNumber[1]==="8"){var calcFirstDigit=calcSum(standardWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.matoGrossoStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==11){return false;}var firstDigitWeights=[3,2,9,8,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[10])){return true;}return false;}return{validate:validate};}();UOL.platform.fields.minasGeraisStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(number,checkNumber){if(number.length!==13){return false;}var firstDigitWeights=[1,2,1,2,1,2,1,2,1,2,1,2];var secondDigitWeights=[3,2,11,10,9,8,7,6,5,4,3,2];var checkerArray=[];var auxArray=[];var sumArray=0;checkNumber.splice(3,0,"0");var index;for(index=0;index&lt;firstDigitWeights.length;index++){var calcFirstDigit=parseInt(checkNumber[index])*parseInt(firstDigitWeights[index]);if(calcFirstDigit&gt;9){calcFirstDigit=calcFirstDigit+"";auxArray=calcFirstDigit.split("");checkerArray.push(parseInt(auxArray[0]));checkerArray.push(parseInt(auxArray[1]));}else{checkerArray.push(calcFirstDigit);}}for(index=0;index&lt;checkerArray.length;index++){sumArray+=parseInt(checkerArray[index]);}var firstDigit=parseInt(sumArray/10);firstDigit=(firstDigit+1)*10;firstDigit=firstDigit-sumArray;if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(number[11])){checkNumber.splice(3,1);var calcSecondDigit=calcSum(secondDigitWeights,checkNumber);calcSecondDigit=calcSecondDigit%11;var secondDigit;if(calcSecondDigit===0||calcSecondDigit===1){secondDigit=0;}else{secondDigit=11-calcSecondDigit;}if(secondDigit===parseInt(number[12])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.paraStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber,standardWeights){if(checkNumber.length!==9){return false;}if(checkNumber[0]==="1"&amp;&amp;checkNumber[1]==="5"){var calcFirstDigit=calcSum(standardWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[8])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.paranaStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==10){return false;}var firstDigitWeights=[3,2,7,6,5,4,3,2];var secondDigitWeights=[4,3,2,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[8])){var calcSecondDigit=calcSum(secondDigitWeights,checkNumber);var secondDigit=11-(calcSecondDigit%11);if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(checkNumber[9])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.pernambucoStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==9&amp;&amp;checkNumber.length!==14){return false;}var weightsEFisco=[9,8,7,6,5,4,3,2];var weightsOld=[5,4,3,2,1,9,8,7,6,5,4,3,2];var calcFirstDigit;var firstDigit;if(checkNumber.length===9){calcFirstDigit=0;for(var index=0;index&lt;weightsEFisco.length-1;index++){calcFirstDigit+=parseInt(checkNumber[index])*parseInt(weightsEFisco[index+1]);}firstDigit=calcFirstDigit%11;if(((firstDigit===0||firstDigit===1)&amp;&amp;(parseInt(checkNumber[7])===0))||(11-firstDigit===parseInt(checkNumber[7]))){var calcSecondDigit=calcSum(weightsEFisco,checkNumber);var secondDigit=calcSecondDigit%11;if(((secondDigit===0||secondDigit===1)&amp;&amp;(parseInt(checkNumber[8])===0))||(11-secondDigit===parseInt(checkNumber[8]))){return true;}return false;}return false;}calcFirstDigit=calcSum(weightsOld,checkNumber);firstDigit=11-(calcFirstDigit%11);if((firstDigit&gt;9&amp;&amp;(parseInt(checkNumber[13])===10-firstDigit))||(firstDigit===parseInt(checkNumber[13]))){return true;}return false;}return{validate:validate};}();UOL.platform.fields.rioGrandeNorteStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==9&amp;&amp;checkNumber.length!==10){return false;}var firstDigitWeights=[10,9,8,7,6,5,4,3,2];if(checkNumber.length===9){checkNumber.unshift(0);}var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=(calcFirstDigit*10)%11;if(firstDigit&gt;9&amp;&amp;(parseInt(checkNumber[9])===0)){return true;}else{if(firstDigit===parseInt(checkNumber[9])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.rioGrandeSulStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==10){return false;}var firstDigitWeights=[2,9,8,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9&amp;&amp;(parseInt(checkNumber[9])===0)){return true;}else{if(firstDigit===parseInt(checkNumber[9])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.rioJaneiroStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==8){return false;}var firstDigitWeights=[2,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=calcFirstDigit%11;if((firstDigit===0||firstDigit===1)&amp;&amp;(parseInt(checkNumber[7])===0)){return true;}else{if(11-firstDigit===parseInt(checkNumber[7])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.rondoniaStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==14){return false;}var firstDigitWeights=[6,5,4,3,2,9,8,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9&amp;&amp;(firstDigit-10===parseInt(checkNumber[13]))){return true;}else{if(firstDigit===parseInt(checkNumber[13])){return true;}}return false;}return{validate:validate};}();UOL.platform.fields.roraimaStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==9){return false;}var firstDigitWeights=[1,2,3,4,5,6,7,8];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);if(calcFirstDigit%9===parseInt(checkNumber[8])){return true;}return false;}return{validate:validate};}();UOL.platform.fields.saoPauloStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(sourceNumber,checkNumber){if(checkNumber.length!==12){return false;}var firstDigitWeights=[1,3,4,5,6,7,8,10];var utilCheckNumber=checkNumber.slice(0,8);var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=calcFirstDigit%11;if(firstDigit&gt;9){firstDigit=0;}if(firstDigit!==parseInt(checkNumber[8])){return false;}if(sourceNumber.indexOf("P")===0){return true;}var secondDigitWeights=[3,2,10,9,8,7,6,5,4,3,2];var calcSecondDigit=calcSum(secondDigitWeights,checkNumber);var secondDigit=calcSecondDigit%11;if(secondDigit&gt;9){secondDigit=0;}if(secondDigit===parseInt(checkNumber[11])){return true;}return false;}return{validate:validate};}();UOL.platform.fields.tocantinsStateTax=function(){function calcSum(weights,checkNumber){var calc=0;for(var index=0;index&lt;weights.length;index++){calc+=parseInt(checkNumber[index])*parseInt(weights[index]);}return calc;}function validate(checkNumber){if(checkNumber.length!==11){return false;}var firstDigitWeights=[9,8,0,0,7,6,5,4,3,2];var calcFirstDigit=calcSum(firstDigitWeights,checkNumber);var firstDigit=11-(calcFirstDigit%11);if(firstDigit&gt;9){firstDigit=0;}if(firstDigit===parseInt(checkNumber[10])){return true;}return false;}return{validate:validate};}();UOL.platform.fields.address=function(){var utils=UOL.platform.utils;var MIN_ADDRESS_NUMBER=1;var MAX_ADDRESS_NUMBER=20;var MIN_ADDRESS_STREET=2;var MAX_ADDRESS_STREET=80;var MIN_ADDRESS_COMPLEMENT=2;var MAX_ADDRESS_COMPLEMENT=40;var MIN_INTERNATIONAL_POSTAL_CODE=2;var MAX_INTERNATIONAL_POSTAL_CODE=10;var LENGTH_CEP=8;var MIN_ADDRESS_DISTRICT=2;var MAX_ADDRESS_DISTRICT=60;var MIN_ADDRESS_CITY=2;var MAX_ADDRESS_CITY=60;var MIN_ADDRESS_FEDERATION_UNIT=2;var MAX_ADDRESS_FEDERATION_UNIT=3;var BRAZIL_ISO_COUNTRY_CODE=76;function hasValidCEPChars(value){if(value.match(/^[0-9\-\/]+$/)){return true;}return false;}function hasValidNumber(value){if(value.match(/^((S\/?N)|[0-9]+\s*([aA-zZ0-9]\s*)*)$/i)){return true;}return false;}function checkAddressNumber(addressNumber){if(utils.isEmpty(addressNumber)){return new utils.ErrorMessage({code:4001501,error:"address_number_null",field:"addressNumber",message:"Por favor, informe o número do endereço."});}if(!hasValidNumber(addressNumber)){return new utils.ErrorMessage({code:4001502,error:"address_number_is_not_numeric",field:"addressNumber",message:"Por favor, informe um número válido ou “sn” para endereço sem número."});}if(utils.isTextMoreThan(addressNumber,MAX_ADDRESS_NUMBER)){return new utils.ErrorMessage({code:4001504,error:"address_number_too_long",field:"addressNumber",message:"Por favor, informe um número com no máximo "+MAX_ADDRESS_NUMBER+" caracteres."});}}function isValidCEPMask(cep){if(cep.match(/^[0-9]{5}-[0-9]{3}|[0-9]{8}$/)){return true;}return false;}function checkAddressPostalCode(postalCode,isoCountryCode){if(utils.isEmpty(postalCode)){return new utils.ErrorMessage({code:4001505,error:"postal_code_null",field:"postalCode",message:"Por favor, informe o CEP do endereço."});}if(utils.isNull(isoCountryCode)){return new utils.ErrorMessage({code:4001535,error:"iso_country_code_null",field:"isoCountryCode",message:"Código do pais inválido."});}if(isoCountryCode==BRAZIL_ISO_COUNTRY_CODE){return checkBrazilAddressPostalCode(postalCode);}else{if(utils.hasAnySpecialChar(postalCode)){return new utils.ErrorMessage({code:4001509,error:"postal_code_has_invalid_chars",field:"postalCode",message:"Por favor, informe o CEP usando números."});}if(utils.isTextLessThan(postalCode,MIN_INTERNATIONAL_POSTAL_CODE)){return new utils.ErrorMessage({code:4001510,error:"postal_code_too_short",field:"postalCode",message:"Por favor, informe o CEP com no mínimo "+MIN_INTERNATIONAL_POSTAL_CODE+" caracteres."});}if(utils.isTextMoreThan(postalCode,MAX_INTERNATIONAL_POSTAL_CODE)){return new utils.ErrorMessage({code:4001511,error:"postal_code_too_long",field:"postalCode",message:"Por favor, informe um CEP com no máximo "+MAX_INTERNATIONAL_POSTAL_CODE+" caracteres."});}}}function checkBrazilAddressPostalCode(postalCode){if(!hasValidCEPChars(postalCode)){return new utils.ErrorMessage({code:4001506,error:"postal_code_has_invalid_chars",field:"postalCode",message:"Por favor, informe o CEP usando números."});}if(utils.getDigits(postalCode).length!==LENGTH_CEP){return new utils.ErrorMessage({code:4001507,error:"postal_code_does_not_have_"+LENGTH_CEP+"_numbers",field:"postalCode",message:"Por favor, informe um CEP com "+LENGTH_CEP+" números."});}if(!isValidCEPMask(postalCode)){return new utils.ErrorMessage({code:4001508,error:"postal_code_invalid_mask",field:"postalCode",message:"Por favor, informe um CEP no formato válido."});}}function checkAddressStreet(street){if(utils.isEmpty(street)){return new utils.ErrorMessage({code:4001512,error:"street_null",field:"street",message:"Por favor, informe a rua do endereço."});}if(utils.hasAnySpecialChar(street)){return new utils.ErrorMessage({code:4001513,error:"street_has_invalid_chars",field:"street",message:"Por favor, informe uma rua com caracteres válidos."});}if(utils.isTextLessThan(street,MIN_ADDRESS_STREET)){return new utils.ErrorMessage({code:4001514,error:"street_too_short",field:"street",message:"Por favor, informe uma rua com pelo menos "+MIN_ADDRESS_STREET+" caracteres."});}if(utils.isTextMoreThan(street,MAX_ADDRESS_STREET)){return new utils.ErrorMessage({code:4001515,error:"street_too_long",field:"street",message:"Por favor, informe uma rua com no máximo "+MAX_ADDRESS_STREET+" caracteres."});}if(utils.hasTwoConsecutiveSpaces(street)){return new utils.ErrorMessage({code:4001516,error:"street_has_two_consecutive_spaces",field:"street",message:"Por favor, informe uma rua sem dois espaços consecutivos."});}}function checkAddressComplement(complement){if(!utils.isEmpty(complement)){if(utils.hasAnySpecialChar(complement)){return new utils.ErrorMessage({code:4001517,error:"complement_has_invalid_chars",field:"complement",message:"Por favor, informe um complemento com caracteres válidos."});}if(utils.isTextLessThan(complement,MIN_ADDRESS_COMPLEMENT)){return new utils.ErrorMessage({code:4001518,error:"complement_too_short",field:"complement",message:"Por favor, informe um complemento com pelo menos "+MIN_ADDRESS_COMPLEMENT+" caracteres."});}if(utils.isTextMoreThan(complement,MAX_ADDRESS_COMPLEMENT)){return new utils.ErrorMessage({code:4001519,error:"complement_too_long",field:"complement",message:"Por favor, informe um complemento com no máximo "+MAX_ADDRESS_COMPLEMENT+" caracteres."});}if(utils.hasTwoConsecutiveSpaces(complement)){return new utils.ErrorMessage({code:4001520,error:"complement_has_two_consecutive_spaces",field:"complement",message:"Por favor, informe um complemento sem dois espaços consecutivos."});}}}function checkAddressDistrict(district){if(utils.isEmpty(district)){return new utils.ErrorMessage({code:4001521,error:"district_null",field:"district",message:"Por favor, informe o bairro do endereço."});}if(utils.hasAnySpecialChar(district)){return new utils.ErrorMessage({code:4001522,error:"district_has_invalid_chars",field:"district",message:"Por favor, informe um bairro com caracteres válidos."});}if(utils.isTextLessThan(district,MIN_ADDRESS_DISTRICT)){return new utils.ErrorMessage({code:4001523,error:"district_too_short",field:"district",message:"Por favor, informe um bairro com pelo menos "+MIN_ADDRESS_DISTRICT+" caracteres."});}if(utils.isTextMoreThan(district,MAX_ADDRESS_DISTRICT)){return new utils.ErrorMessage({code:4001524,error:"district_too_long",field:"district",message:"Por favor, informe um bairro com no máximo "+MAX_ADDRESS_DISTRICT+" caracteres."});}if(utils.hasTwoConsecutiveSpaces(district)){return new utils.ErrorMessage({code:4001525,error:"district_has_two_consecutive_spaces",field:"district",message:"Por favor, informe um bairro sem dois espaços consecutivos."});}}function checkAddressCity(city){if(utils.isEmpty(city)){return new utils.ErrorMessage({code:4001526,error:"city_null",field:"city",message:"Por favor, informe a cidade do endereço."});}if(utils.hasAnySpecialChar(city)){return new utils.ErrorMessage({code:4001527,error:"city_has_invalid_chars",field:"city",message:"Por favor, informe uma cidade com caracteres válidos."});}if(utils.isTextLessThan(city,MIN_ADDRESS_CITY)){return new utils.ErrorMessage({code:4001528,error:"city_too_short",field:"city",message:"Por favor, informe uma cidade com pelo menos "+MIN_ADDRESS_CITY+" caracteres."});}if(utils.isTextMoreThan(city,MAX_ADDRESS_CITY)){return new utils.ErrorMessage({code:4001529,error:"city_too_long",field:"city",message:"Por favor, informe uma cidade com no máximo "+MAX_ADDRESS_CITY+" caracteres."});}if(utils.hasTwoConsecutiveSpaces(city)){return new utils.ErrorMessage({code:4001530,error:"city_has_two_consecutive_spaces",field:"city",message:"Por favor, informe uma cidade sem dois espaços consecutivos."});}}function isValidFederationUnitAbvMask(federationUnit){if(!federationUnit.match(/[a-zA-Z]+$/g)){return true;}return false;}function checkAddressFederationUnitAbv(federationUnit){if(utils.isEmpty(federationUnit)){return new utils.ErrorMessage({code:4001531,error:"federation_unit_null",field:"federationUnit",message:"Por favor, informe o estado."});}if(utils.isTextLessThan(federationUnit,MIN_ADDRESS_FEDERATION_UNIT)){return new utils.ErrorMessage({code:4001532,error:"federation_unit_too_short",field:"federationUnit",message:"Por favor, informe um estado com pelo menos "+MIN_ADDRESS_FEDERATION_UNIT+" caracteres."});}if(utils.isTextMoreThan(federationUnit,MAX_ADDRESS_FEDERATION_UNIT)){return new utils.ErrorMessage({code:4001533,error:"federation_unit_too_long",field:"federationUnit",message:"Por favor, informe um estado com no máximo "+MAX_ADDRESS_FEDERATION_UNIT+" caracteres."});}if(isValidFederationUnitAbvMask(federationUnit)){return new utils.ErrorMessage({code:4001534,error:"federation_unit_has_invalid_chars",field:"federationUnit",message:"Por favor, informe um estado com caracteres válidos."});}}function checkNotOfficialFields(street,district,city,federationUnit){var returnStreet=checkAddressStreet(street);var returnDistrict=checkAddressDistrict(district);var returnCity=checkAddressCity(city);var returnFederationUnit=checkAddressFederationUnitAbv(federationUnit);if(typeof returnStreet!=="undefined"){return returnStreet;}if(typeof returnDistrict!=="undefined"){return returnDistrict;}if(typeof returnCity!=="undefined"){return returnCity;}if(typeof returnFederationUnit!=="undefined"){return returnFederationUnit;}}function checkCommonFields(addressNumber,complement){var returnAddressNumber=checkAddressNumber(addressNumber);var returnComplement=checkAddressComplement(complement);if(typeof returnAddressNumber!=="undefined"){return returnAddressNumber;}if(typeof returnComplement!=="undefined"){return returnComplement;}}function check(postalCode,street,district,city,federationUnit,addressNumber,complement){var returnPostalCode=checkAddressPostalCode(postalCode,BRAZIL_ISO_COUNTRY_CODE);if(typeof returnPostalCode!=="undefined"){return returnPostalCode;}var returnNotOficialFields=checkNotOfficialFields(street,district,city,federationUnit);var returnCommonFields=checkCommonFields(addressNumber,complement);if(typeof returnNotOficialFields!=="undefined"){return returnNotOficialFields;}if(typeof returnCommonFields!=="undefined"){return returnCommonFields;}}return{checkAddressNumber:checkAddressNumber,checkAddressPostalCode:checkAddressPostalCode,checkAddressStreet:checkAddressStreet,checkAddressComplement:checkAddressComplement,checkAddressDistrict:checkAddressDistrict,checkAddressCity:checkAddressCity,checkAddressFederationUnitAbv:checkAddressFederationUnitAbv,checkNotOfficialFields:checkNotOfficialFields,checkCommonFields:checkCommonFields,check:check};}();UOL.platform.fields.birthDate=function(){var dateUtils=UOL.platform.utils.dateUtils;function check(birthDate){var error=dateUtils.checkWithMaxAge(birthDate,120);if(error!==undefined){error.field="birthDate";return error;}}return{check:check};}();UOL.platform.fields.cellphone=function(){var utils=UOL.platform.utils;function isValidCellPhoneRange(range,cellphone){for(var rangePos=0;rangePos&lt;range.length;rangePos++){var initialRangeValue=range[rangePos][0];var finalRangeValue=range[rangePos][1];var cellphoneIntNumber=parseInt(utils.getDigits(cellphone));if(cellphoneIntNumber&gt;=initialRangeValue&amp;&amp;cellphoneIntNumber&lt;=finalRangeValue){return true;}}return false;}function isValidCellPhoneNumber(ddd,cellphone){var isValidNumber=/^9?\d{4}[-\\.\s]?\d{4}$/;var dddProperties=utils.cellphoneUtils[ddd];if(isValidNumber.test(cellphone)&amp;&amp;dddProperties!==undefined){var cellphoneToCheck=parseInt(utils.getDigits(cellphone));cellphoneToCheck=cellphoneToCheck.toString();var isNineDigitsNumber=cellphoneToCheck.length===9&amp;&amp;dddProperties.rangeNineDigits!==undefined&amp;&amp;cellphoneToCheck.charAt(0)==="9";var isEightDigitsNumber=cellphoneToCheck.length===8&amp;&amp;dddProperties.rangeEightDigits!==undefined;if(isNineDigitsNumber){cellphoneToCheck=cellphoneToCheck.substring(1);return isValidCellPhoneRange(dddProperties.rangeNineDigits,cellphoneToCheck);}if(isEightDigitsNumber){return isValidCellPhoneRange(dddProperties.rangeEightDigits,cellphoneToCheck);}return false;}else{return false;}}function isValidDDD(ddd){if(utils.cellphoneUtils[ddd]!==undefined){return true;}return false;}function checkDDD(ddd){if(utils.isBlank(ddd)){return new utils.ErrorMessage({code:4000101,error:"ddd_null",field:"cellphone",message:"Informe o DDD."});}if(!utils.isNumeric(ddd)){return new utils.ErrorMessage({code:4000102,error:"ddd_invalid_chars",field:"cellphone",message:"DDD inválido. Verifique o código informado."});}if(ddd.length&lt;2){return new utils.ErrorMessage({code:4000103,error:"ddd_min_length",field:"cellphone",message:"DDD inválido. Informe um código com dois algarismos."});}if(ddd.length&gt;2){return new utils.ErrorMessage({code:4000104,error:"ddd_max_length",field:"cellphone",message:"DDD inválido. Informe um código com dois algarismos."});}if(!isValidDDD(ddd)){return new utils.ErrorMessage({code:4000105,error:"ddd_invalid_number",field:"cellphone",message:"DDD inválido. Verifique o código informado."});}return null;}function check(ddd,cellphone){var dddErrorCode=checkDDD(ddd);if(!utils.isNull(dddErrorCode)){return dddErrorCode;}if(utils.isBlank(cellphone)){return new utils.ErrorMessage({code:4000105,error:"cellphone_null",field:"cellphone",message:"Informe um telefone celular."});}if(!isValidCellPhoneNumber(ddd,cellphone)){return new utils.ErrorMessage({code:4000106,error:"cellphone_invalid",field:"cellphone",message:"Telefone celular inválido. Verifique o número do telefone informado."});}}return{check:check,isValidCellPhoneNumber:isValidCellPhoneNumber};}();UOL.platform.fields.cnpj=function(){var utils=UOL.platform.utils;function hasValidChars(number){if(number.match(/^[0-9\.\-\/]+$/)){return true;}}function isValidCNPJ(cnpj){cnpj=utils.getDigits(cnpj);var sum=0;if(cnpj==="00000000000000"){return false;}var j=5;for(var i=0;i&lt;12;i++){sum+=j*(cnpj.charAt(i)-"0");j--;if(j&lt;2){j=9;}}sum=11-(sum%11);if(sum&gt;9){sum=0;}if(sum==(cnpj.charAt(12)-"0")){sum=0;for(i=0,j=6;i&lt;13;i++){sum+=j--*(cnpj.charAt(i)-"0");if(j&lt;2){j=9;}}sum=11-(sum%11);if(sum&gt;9){sum=0;}if(sum==(cnpj.charAt(13)-"0")){return true;}}return false;}function isValidCNPJMask(cnpj){if(cnpj.match(/^(([0-9]{2}\.[0-9]{3}\.[0-9]{3}\/[0-9]{4}\-[0-9]{2})|[0-9]{14})$/)){return true;}return false;}function check(cnpj){if(utils.isEmpty(cnpj)){return new utils.ErrorMessage({code:4001301,error:"cnpj_null",field:"cnpj",message:"Por favor, informe um CNPJ."});}if(!hasValidChars(cnpj)){return new utils.ErrorMessage({code:4001302,error:"cnpj_has_invalid_chars",field:"cnpj",message:"Por favor, informe um CNPJ com caracteres válidos."});}if(utils.getDigits(cnpj).length!==14){return new utils.ErrorMessage({code:4001303,error:"cnpj_does_not_have_14_numbers",field:"cnpj",message:"Por favor, informe um CNPJ com 14 números."});}if(!isValidCNPJ(cnpj)){return new utils.ErrorMessage({code:4001305,error:"cnpj_is_invalid",field:"cnpj",message:"Por favor, informe um CNPJ válido."});}if(!isValidCNPJMask(cnpj)){return new utils.ErrorMessage({code:4001306,error:"cnpj_has_invalid_mask",field:"cnpj",message:"Por favor, informe um CNPJ no formato válido."});}}return{check:check};}();UOL.platform.fields.companyCorporateName=function(){var utils=UOL.platform.utils;function check(name){if(utils.isEmpty(name)){return new utils.ErrorMessage({code:4000601,error:"corporateName_null",field:"corporateName",message:"Por favor, informe uma razão social."});}if(utils.isTextMoreThan(name,60)){return new utils.ErrorMessage({code:4000602,error:"corporateName_larger_than_limit",field:"corporateName",message:"Por favor, informe uma razão social com menos de 60 caracteres."});}if(utils.isTextLessThan(name,3)){return new utils.ErrorMessage({code:4000603,error:"corporateName_smaller_than_limit",field:"corporateName",message:"Por favor, informe uma razão social com mais de 2 caracteres."});}if(!utils.hasLetters(name)){return new utils.ErrorMessage({code:4000504,error:"corporateName_does_not_have_letters",field:"corporateName",message:"Por favor, informe uma razão social que contenha letras."});}if(!utils.firstCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000604,error:"corporateName_first_char_is_not_letter_or_digit",field:"corporateName",message:"Por favor, informe uma razão social que comece com letras ou dígitos."});}if(utils.hasTwoConsecutiveSpaces(name)){return new utils.ErrorMessage({code:4000605,error:"corporateName_has_two_consecutive_spaces",field:"corporateName",message:"Por favor, informe uma razão social sem dois espaços consecutivos."});}if(!utils.lastCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000606,error:"corporateName_last_char_is_not_letter_or_digit",field:"corporateName",message:"Por favor, informe uma razão social que termine com letras ou dígitos."});}if(utils.hasNoAllowedCharsForCorporate(name)){return new utils.ErrorMessage({code:4000607,error:"corporateName_has_any_special_chars",field:"corporateName",message:"Por favor, informe uma razão social sem caracteres especiais."});}if(!utils.hasTwoNames(name)){return new utils.ErrorMessage({code:4000608,error:"corporateName_does_not_have_two_names",field:"corporateName",message:"Por favor, informe a razão social completa."});}}return{check:check};}();UOL.platform.fields.companyTradingName=function(){var utils=UOL.platform.utils;function check(name){if(utils.isEmpty(name)){return new utils.ErrorMessage({code:4000701,error:"tradingName_null",field:"tradingName",message:"Por favor, informe um nome fantasia."});}if(utils.isTextMoreThan(name,60)){return new utils.ErrorMessage({code:4000702,error:"tradingName_larger_than_limit",field:"tradingName",message:"Por favor, informe um nome fantasia com menos de 60 caracteres."});}if(utils.isTextLessThan(name,3)){return new utils.ErrorMessage({code:4000703,error:"tradingName_smaller_than_limit",field:"tradingName",message:"Por favor, informe um nome fantasia com mais de 2 caracteres."});}if(!utils.firstCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000704,error:"tradingName_first_char_is_not_letter_or_digit",field:"tradingName",message:"Por favor, informe um nome fantasia que comece com letras ou dígitos."});}if(utils.hasTwoConsecutiveSpaces(name)){return new utils.ErrorMessage({code:4000705,error:"tradingName_has_two_consecutive_spaces",field:"tradingName",message:"Por favor, informe um nome fantasia sem dois espaços consecutivos."});}if(!utils.lastCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000706,error:"tradingName_last_char_is_not_letter_or_digit",field:"tradingName",message:"Por favor, informe um nome fantasia que termine com letras ou dígitos."});}if(utils.hasNoAllowedCharsForCorporate(name)){return new utils.ErrorMessage({code:4000707,error:"tradingName_has_any_special_chars",field:"tradingName",message:"Por favor, informe um nome fantasia sem caracteres especiais."});}}return{check:check};}();UOL.platform.fields.cpf=function(){var utils=UOL.platform.utils;function cpfHasValidChars(cpf){if(cpf.match(/^[0-9\.\-\/]+$/)){return true;}}function isValidCPF(cpf){cpf=utils.getDigits(cpf);var dv1,dv2;var i,sum,rest;if(cpf.match(/^0{11}|1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}$/)){return false;}sum=0;for(i=0;i&lt;=8;i++){sum+=(cpf.charAt(i)-"0")*(10-i);}rest=sum%11;dv1=(rest&lt;2)?0:11-rest;sum=dv1*2;for(i=0;i&lt;=8;i++){sum+=(cpf.charAt(i)-"0")*(11-i);}rest=sum%11;dv2=(rest&lt;2)?0:11-rest;if((dv1==cpf.charAt(9)-"0")&amp;&amp;(dv2==cpf.charAt(10)-"0")){return true;}return false;}function isValidCPFMask(cpf){if(cpf.match(/^([0-9]{3}\.[0-9]{3}\.[0-9]{3}(\-|\/)[0-9]{2}|[0-9]{11})$/)){return true;}return false;}function check(cpf){if(utils.isEmpty(cpf)){return new utils.ErrorMessage({code:4001201,error:"cpf_null",field:"cpf",message:"Por favor, informe um CPF."});}if(!cpfHasValidChars(cpf)){return new utils.ErrorMessage({code:4001202,error:"cpf_has_invalid_chars",field:"cpf",message:"Por favor, informe um CPF com caracteres válidos."});}if(utils.getDigits(cpf).length!==11){return new utils.ErrorMessage({code:4001203,error:"cpf_does_not_have_11_numbers",field:"cpf",message:"Por favor, informe um CPF com 11 números."});}if(!isValidCPF(cpf)){return new utils.ErrorMessage({code:4001205,error:"cpf_is_invalid",field:"cpf",message:"Por favor, informe um CPF válido."});}if(!isValidCPFMask(cpf)){return new utils.ErrorMessage({code:4001206,error:"cpf_has_invalid_mask",field:"cpf",message:"Por favor, informe um CPF no formato válido."});}}return{check:check};}();UOL.platform.fields.creditCard=function(){var utils=UOL.platform.utils;var properties=UOL.platform.fields.creditCardProperties;var creditCardUtils=UOL.platform.utils.creditCardUtils;var creditCardModule=UOL.platform.fields.creditCardModule;function check(brand,number,cvv,month,year){var returnCVV=checkCVV(brand,cvv);var returnNumber=checkNumber(brand,number);var returnModule=creditCardUtils.isValidModule(brand,number);var returnDate=date(month,year);if(typeof returnNumber!=="undefined"){return returnNumber;}if(typeof returnCVV!=="undefined"){return returnCVV;}if(typeof returnModule!=="undefined"){return returnModule;}if(typeof returnDate!=="undefined"){return returnDate;}}function checkNumber(brand,number){var brandProperties=creditCardUtils.getBrandProperties(brand);if(brandProperties.brand=="hipercard"){return executeHipercardValidation(number,brandProperties);}if(!creditCardUtils.isValidCreditcard(number,brandProperties)){return new utils.ErrorMessage({code:4001400,error:"creditcard_number_invalid",field:"number",message:"Cartão de Credito invalido"});}if(!creditCardUtils.isValidPrefix(number,brandProperties)){return new utils.ErrorMessage({code:4001402,error:"creditcard_prefix_invalid",field:"number",message:"Cartão de Credito invalido"});}}function checkCVV(brand,cvv){if(!creditCardUtils.isValidCVV(cvv,creditCardUtils.getBrandProperties(brand))){return new utils.ErrorMessage({code:4001401,error:"creditcard_cvv_invalid",field:"cvv",message:"CVV invalido"});}}function executeHipercardValidation(number,properties){if(!creditCardUtils.isValidCreditcard(number,properties)){return new utils.ErrorMessage({code:4001404,error:"creditcard_number_invalid",field:"number",message:"Cartão de Credito invalido"});}if(number.length!=13&amp;&amp;number.length!=16){return new utils.ErrorMessage({code:4001405,error:"creditcard_number_invalid",field:"number",message:"Cartão de Credito invalido"});}else{if(number.length==13){var pattern=new RegExp("^(00|60|40)");if(!(pattern.test(number))){return new utils.ErrorMessage({code:4001406,error:"creditcard_number_invalid",field:"number",message:"Cartão de Credito invalido"});}}}}function date(month,year){var today=new Date();if(utils.isNumeric(month)&amp;&amp;utils.isNumeric(year)&amp;&amp;month&lt;=12&amp;&amp;month&gt;=1&amp;&amp;year&gt;0){var userDate=new Date(year,parseInt(month)-1,today.getDate(),today.getHours(),today.getMinutes(),today.getSeconds(),today.getMilliseconds());if(today&gt;userDate){return new utils.ErrorMessage({code:4000501,error:"date_lower_than_today",field:"date",message:"A data informada é anterior a data atual."});}}else{return new utils.ErrorMessage({code:4000502,error:"date_invalid",field:"date",message:"A data informada não é válida."});}}return{date:date,check:check,checkCVV:checkCVV,checkNumber:checkNumber};}();UOL.platform.fields.debitAccount=function(){var utils=UOL.platform.utils;var debitAccountUtils=UOL.platform.utils.debitAccountUtils;var itauValidator=UOL.platform.fields.debitAccountItau;var bbValidator=UOL.platform.fields.debitAccountBB;var mercantilValidator=UOL.platform.fields.debitAccountMercantil;var banrisulValidator=UOL.platform.fields.debitAccountBanrisul;var bradescoValidator=UOL.platform.fields.debitAccountBradesco;var hsbcValidator=UOL.platform.fields.debitAccountHSBC;var santanderValidator=UOL.platform.fields.debitAccountSantander;var cefValidator=UOL.platform.fields.debitAccountCEF;function check(branchNumber,branchDigit,accountNumber,accountDigit,bankName){var validationResult=null;switch(bankName){case"itau":validationResult=itauValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"bb":validationResult=bbValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"mercantil":validationResult=mercantilValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"banrisul":validationResult=banrisulValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"bradesco":validationResult=bradescoValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"hsbc":validationResult=hsbcValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"santander":validationResult=santanderValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;case"cef":validationResult=cefValidator.validate(branchNumber,branchDigit,accountNumber,accountDigit);break;default:return new utils.ErrorMessage({code:4001607,error:"bank_invalid",field:"bankName",message:"Por favor, escolha um dos bancos disponíveis."});}if(validationResult!==null){return validationResult;}}return{check:check};}();UOL.platform.fields.email=function(){var utils=UOL.platform.utils;function isThereAnyCharacterInvalid(email){var regex=/[^a-zA-Z0-9\.\-_@]/g;return regex.test(email);}function isThereAnyAtSimbol(email){var regex=/@/;return regex.test(email);}function isThereAnyCharacterDifferentThanLetterOrDigitBeforeAtSign(email){var regex=/[^a-zA-Z0-9\.\-_]+@/;return regex.test(email);}function isThereTwoOrMoreAtSign(email){return email.split("@").length&gt;2;}function isThereAnyCharacterBeforeAtSign(email){var regex=/^(.)+@/;return regex.test(email);}function isThereAnyCharacterAfterAtSign(email){var regex=/@(.)+$/;return regex.test(email);}function isThereAPointRightAfterAtSign(email){var regex=/@\./;return regex.test(email);}function isThereConsecutivePointsAfterAtSign(email){var regex=/@(.){0,}(\.){2}/;return regex.test(email);}function isThereDotSignInLastChar(email){var regex=/\.$/;return regex.test(email);}function isThereAnyCharacterDifferentThanLetterOrDigitAfterAtSign(email){var regex=/@[^a-zA-Z0-9]+/;return regex.test(email);}function isThereAnyPointAfterAtSign(email){var regex=/@.*\./;return regex.test(email);}function isThereAnyDoublePoint(email){var regex=/[\.][\.]/;return regex.test(email);}function isThereAnyDoubleDash(email){var regex=/[\-][\-]/;return regex.test(email);}function startsWithDot(email){var regex=/^\./;return regex.test(email);}function startsWithDash(email){var regex=/^\-/;return regex.test(email);}function endsWithDot(email){var regex=/\.@/;return regex.test(email);}function endsWithDash(email){var regex=/\-@/;return regex.test(email);}function hasMinLength(email){var emailLocalPart=email.split("@")[0];return(emailLocalPart&amp;&amp;emailLocalPart.length&lt;2);}function hasMaxLength(email){var emailLocalPart=email.split("@")[0];return(emailLocalPart&amp;&amp;emailLocalPart.length&gt;32);}function checkInternalMailBox(email){if(utils.isBlank(email)){return new utils.ErrorMessage({code:4000201,error:"email_null",field:"email",message:"Você não informou o seu e-mail."});}else{if(email.length&lt;5){return new utils.ErrorMessage({code:4000202,error:"email_min_length",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}else{if(email.length&gt;60){return new utils.ErrorMessage({code:4000203,error:"email_max_length",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}else{if(isThereTwoOrMoreAtSign(email)){return new utils.ErrorMessage({code:4000205,error:"email_has_more_than_one_at",field:"email",message:"O e-mail informado contém mais de um @ (arroba)."});}else{if(!isThereAnyAtSimbol(email)){return new utils.ErrorMessage({code:4000206,error:"email_without_at",field:"email",message:"O e-mail informado não contém @ (arroba)."});}else{if(!isThereAnyCharacterBeforeAtSign(email)){return new utils.ErrorMessage({code:4000207,error:"email_no_char_before_at",field:"email",message:"O e-mail informado não contém caracteres antes do @ (arroba)."});}else{if(isThereAnyCharacterDifferentThanLetterOrDigitBeforeAtSign(email)){return new utils.ErrorMessage({code:4000208,error:"email_no_letter_or_digit_before_at",field:"email",message:"O e-mail informado contém caracteres inválidos antes do @ (arroba)."});}else{if(isThereDotSignInLastChar(email)){return new utils.ErrorMessage({code:4000212,error:"email_has_dot_in_last_char",field:"email",message:"O e-mail informado não contém caracteres após o ponto."});}else{if(isThereAnyDoublePoint(email)){return new utils.ErrorMessage({code:4000216,error:"email_invalid_chars",field:"email",message:"O e-mail informado não deve conter dois pontos seguidos."});}else{if(isThereAnyDoubleDash(email)){return new utils.ErrorMessage({code:4000217,error:"email_invalid_double_dash",field:"email",message:"O e-mail informado não deve conter dois hífens seguidos."});}else{if(startsWithDot(email)){return new utils.ErrorMessage({code:4000218,error:"email_invalid_starts_with_dot",field:"email",message:"O e-mail informado não deve iniciar com ponto."});}else{if(startsWithDash(email)){return new utils.ErrorMessage({code:4000219,error:"email_invalid_starts_with_dash",field:"email",message:"O e-mail informado não deve começar com hífen."});}else{if(endsWithDot(email)){return new utils.ErrorMessage({code:4000222,error:"email_invalid_ends_with_dot",field:"email",message:"O e-mail informado não deve terminar com ponto."});}else{if(endsWithDash(email)){return new utils.ErrorMessage({code:4000223,error:"email_invalid_ends_with_dash",field:"email",message:"O e-mail informado não deve terminar com hífen."});}else{if(hasMinLength(email)){return new utils.ErrorMessage({code:4000220,error:"email_invalid_min_length",field:"email",message:"O e-mail informado deve conter, no mínimo, dois caracteres."});}else{if(hasMaxLength(email)){return new utils.ErrorMessage({code:4000221,error:"email_invalid_max_length",field:"email",message:"O e-mail informado deve conter, no máximo, 32 caracteres."});}}}}}}}}}}}}}}}}var regex=/^([a-z0-9\.\-]+)@(uol\.com\.br|bol\.com\.br|zipmail\.com\.br)$/;if(!regex.test(email)){return new utils.ErrorMessage({code:4000204,error:"email_invalid_chars",field:"email",message:"O e-mail informado contém caracteres inválidos."});}}function check(email,checkInvalidDomain){if(utils.isBlank(email)){return new utils.ErrorMessage({code:4000201,error:"email_null",field:"email",message:"Você não informou o seu e-mail."});}else{if(email.length&lt;5){return new utils.ErrorMessage({code:4000202,error:"email_min_length",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}else{if(email.length&gt;60){return new utils.ErrorMessage({code:4000203,error:"email_max_length",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}else{if(isThereAnyCharacterInvalid(email)){return new utils.ErrorMessage({code:4000204,error:"email_invalid_chars",field:"email",message:"O e-mail informado contém caracteres inválidos."});}else{if(isThereTwoOrMoreAtSign(email)){return new utils.ErrorMessage({code:4000205,error:"email_has_more_than_one_at",field:"email",message:"O e-mail informado contém mais de um @ (arroba)."});}else{if(!isThereAnyAtSimbol(email)){return new utils.ErrorMessage({code:4000206,error:"email_without_at",field:"email",message:"O e-mail informado não contém @ (arroba)."});}else{if(!isThereAnyCharacterBeforeAtSign(email)){return new utils.ErrorMessage({code:4000207,error:"email_no_char_before_at",field:"email",message:"O e-mail informado não contém caracteres antes do @ (arroba)."});}else{if(isThereAnyCharacterDifferentThanLetterOrDigitBeforeAtSign(email)){return new utils.ErrorMessage({code:4000208,error:"email_no_letter_or_digit_before_at",field:"email",message:"O e-mail informado contém caracteres inválidos antes do @ (arroba)."});}else{if(!isThereAnyCharacterAfterAtSign(email)){return new utils.ErrorMessage({code:4000209,error:"email_no_char_after_at",field:"email",message:"O e-mail informado não contém caracteres depois do @ (arroba)."});}else{if(isThereAPointRightAfterAtSign(email)){return new utils.ErrorMessage({code:4000210,error:"email_has_dot_right_after_at",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}else{if(isThereConsecutivePointsAfterAtSign(email)){return new utils.ErrorMessage({code:4000211,error:"email_has_consecutive_dots_after_at",field:"email",message:"O e-mail informado contém mais de um ponto."});}else{if(isThereDotSignInLastChar(email)){return new utils.ErrorMessage({code:4000212,error:"email_has_dot_in_last_char",field:"email",message:"O e-mail informado não contém caracteres após o ponto."});}else{if(isThereAnyCharacterDifferentThanLetterOrDigitAfterAtSign(email)){return new utils.ErrorMessage({code:4000213,error:"email_has_no_letter_or_digit_after_at",field:"email",message:"O e-mail informado não contém caracteres depois do @ (arroba)."});}else{if(!isThereAnyPointAfterAtSign(email)){return new utils.ErrorMessage({code:4000214,error:"email_has_no_dot_after_at",field:"email",message:"O e-mail informado não contém ponto."});}}}}}}}}}}}}}}if(checkInvalidDomain){var invalidEmails="uol.com,uol.br,bol.com,bol.br,zipmail.com,zipmail.br,folha.com,folha.br,gmail.com.br,hotmial.com,ig.com,r7.com.br,terra.com,yaho.com.br,yaho.com";var domains=invalidEmails.split(",");var emailDomain=email.split("@")[1];for(var i=0;i&lt;domains.length;i++){if(emailDomain.toLowerCase()==domains[i]){return new utils.ErrorMessage({code:4000215,error:"email_domain_does_not_exist",field:"email",message:"Confira se você informou o seu e-mail corretamente."});}}}}function checkAlternativeEmail(emailTitular,emailAlternativo){if(utils.isEmpty(emailTitular)){return new utils.ErrorMessage({code:4000201,error:"email_null",field:"email",message:"Você não informou o seu e-mail."});}var error=check(emailAlternativo);if(!utils.isNull(error)){error.message=error.message.replace(/e\-mail/g,"e-mail alternativo");error.field="emailAlternativo";return error;}var areTheSame=utils.trim(emailTitular)==utils.trim(emailAlternativo);if(areTheSame){return new utils.ErrorMessage({code:2,error:"email_titulas_equas_alternative",field:"email",message:"O e-mail informado já foi cadastrado anteriormente. Confira-o e digite novamente."});}}function checkAlternativeEmailConfirmation(emailAlternativo,emailAlternativoConfirmation){var error=check(emailAlternativo);if(!utils.isNull(error)){error.message=error.message.replace(/e\-mail/g,"e-mail alternativo");error.field="emailAlternativo";return error;}error=check(emailAlternativoConfirmation);if(!utils.isNull(error)){error.message=error.message.replace(/e\-mail/g,"e-mail de confirmação alternativo");error.field="emailAlternativoConfirmation";return error;}var emailAlternativoTrim=utils.trim(emailAlternativo);var emailAlternativoConfirmationTrim=utils.trim(emailAlternativoConfirmation);if(emailAlternativoTrim!=emailAlternativoConfirmationTrim){return new utils.ErrorMessage({code:4000215,error:"email_alternative_not_equas_alternative_confirmation",field:"emailAlternativo",message:"O e-mail alternativo e de confirmação estão diferentes. Confira-o e digite novamente."});}}return{check:check,checkInternalMailBox:checkInternalMailBox,checkAlternativeEmail:checkAlternativeEmail,checkAlternativeEmailConfirmation:checkAlternativeEmailConfirmation};}();UOL.platform.fields.foundationDate=function(){var dateUtils=UOL.platform.utils.dateUtils;function check(foundationDate){var error=dateUtils.checkWithMaxAge(foundationDate,120);if(error!==undefined){error.field="foundationDate";return error;}}return{check:check};}();UOL.platform.fields.gender=function(){var utils=UOL.platform.utils;function check(gender){if(utils.isEmpty(gender)){return new utils.ErrorMessage({code:4000801,error:"gender_null",field:"gender",message:"Por favor, selecione um sexo."});}if(!gender.match(/^[mMfF]$/)){return new utils.ErrorMessage({code:4000802,error:"gender_invalid",field:"gender",message:"Por favor, selecione uma opção válida."});}}return{check:check};}();UOL.platform.fields.individualFullName=function(){var utils=UOL.platform.utils;function check(name){if(utils.isEmpty(name)){return new utils.ErrorMessage({code:4000501,error:"name_null",field:"name",message:"Por favor, informe um nome."});}if(utils.isTextMoreThan(name,60)){return new utils.ErrorMessage({code:4000502,error:"name_larger_than_limit",field:"name",message:"Por favor, informe um nome com menos de 60 caracteres."});}if(utils.isTextLessThan(name,3)){return new utils.ErrorMessage({code:4000503,error:"name_smaller_than_limit",field:"name",message:"Por favor, informe um nome com mais de 2 caracteres."});}if(!utils.hasLetters(name)){return new utils.ErrorMessage({code:4000504,error:"name_does_not_have_letters",field:"name",message:"Por favor, informe um nome que contenha letras."});}if(!utils.firstCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000505,error:"name_first_char_is_not_letter_or_digit",field:"name",message:"Por favor, informe um nome que comece com letras ou dígitos."});}if(utils.hasTabCharacter(name)){return new utils.ErrorMessage({code:4000510,error:"name_has_tab_character",field:"name",message:"Por favor, informe um nome sem espaços consecutivos."});}if(utils.hasTwoConsecutiveSpaces(name)){return new utils.ErrorMessage({code:4000506,error:"name_has_two_consecutive_spaces",field:"name",message:"Por favor, informe um nome sem dois espaços consecutivos."});}if(!utils.lastCharIsLetterOrDigit(name)){return new utils.ErrorMessage({code:4000507,error:"name_last_char_is_not_letter_or_digit",field:"name",message:"Por favor, informe um nome que termine com letras ou dígitos."});}if(utils.hasAnySpecialChar(name)){return new utils.ErrorMessage({code:4000508,error:"name_has_any_special_chars",field:"name",message:"Por favor, informe um nome sem caracteres especiais."});}if(!utils.hasTwoNames(name)){return new utils.ErrorMessage({code:4000509,error:"name_does_not_have_two_names",field:"name",message:"Por favor, informe o nome completo."});}}return{check:check};}();UOL.platform.fields.password=function(){var utils=UOL.platform.utils;function isInvalidPasswordLength(password){var passwordLength=utils.stringLength(password);if((passwordLength&lt;8)||(passwordLength&gt;16)){return true;}else{return false;}}function isUnsupportedCharacters(password){var unsupportedCharacters=password.replace(/[A-Za-z0-9]/g,"");var array=new Array("`","~","!","@","#","$","%","^","&amp;","*","(",")","/","_","+","-","=","{","}","|","[","]","\\",":",'"',";","'","&lt;","&gt;","?",",",".","/");for(var x=0;x&lt;array.length;x++){if(password.indexOf(array[x])&gt;=0){unsupportedCharacters=unsupportedCharacters.split(array[x]).join("");}}return unsupportedCharacters.length&gt;0;}function isPasswordContainsLogin(login,password){var username=login.match(/([^@]+)/)[1];if(utils.isStringContainsSubstring(username,password)){return true;}else{return false;}}function isPasswordContainsDomainsWithoutUolOrBol(login,password){var domainFull=login.replace(/^[^@]*@/g,""),domain=domainFull.substr(0,domainFull.indexOf(".")),domainWithoutUolOrBol=domain.replace(/\buol\b|\bbol\b/g,"");if(domainWithoutUolOrBol.length&gt;0){return utils.isStringContainsSubstring(domainWithoutUolOrBol,password);}else{return false;}}function isPasswordNotContainsMinimumClasses(password){var count=0;if(password.match(/\d/)){count++;}if(password.match(/[a-z]/)){count++;}if(password.match(/[A-Z]/)){count++;}if(password.match(/[!-\/:-@[-`{-~]/)){count++;}if(count&gt;=2){return false;}else{return true;}}function commonPasswordValidation(password,passwordConfirmation){if(passwordConfirmation===undefined||passwordConfirmation===null||(passwordConfirmation!==null&amp;&amp;passwordConfirmation.length===0)){return new utils.ErrorMessage({code:4000308,error:"password_confirmation_null",field:"passwordConfirmation",message:"É necessário confirmar a nova senha."});}else{if((passwordConfirmation!==null)&amp;&amp;(passwordConfirmation!==(password===null?"":password))){return new utils.ErrorMessage({code:4000309,error:"password_confirmation_not_equals",field:"passwordConfirmation",message:"Suas senhas não coincidem."});}else{return null;}}}function checkPasswordAndPasswordConfirmation(password,passwordConfirmation,login,score){var error=checkPassword(password,login,score);if(error===null||error===undefined){return commonPasswordValidation(password,passwordConfirmation);}return error;}function checkPasswordAndPasswordConfirmationWithoutLogin(password,passwordConfirmation,score){var error=checkPasswordWithoutLogin(password,score);if(error===null||error===undefined){return commonPasswordValidation(password,passwordConfirmation);}return error;}function hasKeyboardSequence(stringPassword){if(!stringPassword){return false;}var response=false;var keyboardSequences=["1234567890","qwertyuiop","asdfghjkl","zxcvbnm","abcdefghijklmnopqrstuvwxyz"];var numberOfCharactersToConstituteASequence=3;stringPassword=stringPassword.toLowerCase();for(var arrayLength=keyboardSequences.length,count=0;count&lt;arrayLength;count++){var sequence=keyboardSequences[count],sequenceTimesToCheck=sequence.length-numberOfCharactersToConstituteASequence+1;for(var sequenceCount=0;sequenceCount&lt;sequenceTimesToCheck;sequenceCount++){var subSequence=sequence.substr(sequenceCount,numberOfCharactersToConstituteASequence);if(stringPassword.indexOf(subSequence)&gt;=0){response=true;}}}return response;}function hasSameCaractereSequence(password){var sequenceCount=0;var numberOfCharactersToConstituteASequence=2;var sequenceChar="";var response=false;for(var i=0;i&lt;password.length;i++){var actualChar=password.substr(i,1);if(actualChar===password.substr(i+1,1)){if(actualChar!==sequenceChar){sequenceCount++;sequenceChar=actualChar;if(sequenceCount&gt;=numberOfCharactersToConstituteASequence){return true;}}}}return response;}function checkPassword(password,login,score){var error=checkPasswordWithoutLogin(password,score);if(error){return error;}if(utils.isBlank(login)){return new utils.ErrorMessage({code:4000301,error:"null_login",field:"password",message:"E-mail não informado."});}if((!utils.isValidEmail(login))&amp;&amp;(utils.isStringContainsSubstring(login,password))){return new utils.ErrorMessage({code:4000305,error:"password_contains_login",field:"password",message:"Sua senha não pode incluir seu nome ou nome de usuário."});}if((utils.isValidEmail(login))&amp;&amp;(isPasswordContainsLogin(login,password))){return new utils.ErrorMessage({code:4000305,error:"password_contains_login",field:"password",message:"Sua senha não pode incluir seu nome ou nome de usuário."});}if((utils.isValidEmail(login))&amp;&amp;(isPasswordContainsDomainsWithoutUolOrBol(login,password))){return new utils.ErrorMessage({code:4000306,error:"password_contains_login",field:"password",message:"Sua senha não pode incluir seu nome ou nome de usuário."});}}function checkPasswordWithoutLogin(password,score){if(utils.isBlank(password)){return new utils.ErrorMessage({code:4000302,error:"null_password",field:"password",message:"Crie uma senha antes de continuar."});}if(isInvalidPasswordLength(password)){return new utils.ErrorMessage({code:4000303,error:"password_length",field:"password",message:"A senha deve ter entre 8 e 16 caracteres."});}if(isUnsupportedCharacters(password)){return new utils.ErrorMessage({code:4000304,error:"password_invalid_char",field:"password",message:"Há caracteres não aceitos. Caracteres aceitos ` ~ ! @ # $ % ^ &amp; * ( ) _ + - = { } | [ ] \\ : “ ; &lt; &gt; ? , . /"});}if(isPasswordNotContainsMinimumClasses(password)){return new utils.ErrorMessage({code:4000307,error:"password_minimum_required_class",field:"password",message:"Combine letras maiúsculas e minúsculas, números ou caracteres especiais."});}if(hasKeyboardSequence(password)){return new utils.ErrorMessage({code:4000308,error:"keyboard_sequence",field:"password",message:"Remova sequências alfanuméricas ou de teclado."});}if(hasSameCaractereSequence(password)){return new utils.ErrorMessage({code:4000310,error:"caractere_sequence",field:"password",message:"Remova sequências alfanuméricas ou de teclado."});}if(score&amp;&amp;score&lt;3){return new utils.ErrorMessage({code:4000309,error:"low_score",field:"password",message:"Sua senha é fraca. Crie uma senha mais forte."});}}return{checkPassword:checkPassword,checkPasswordAndPasswordConfirmation:checkPasswordAndPasswordConfirmation,checkPasswordWithoutLogin:checkPasswordWithoutLogin,checkPasswordAndPasswordConfirmationWithoutLogin:checkPasswordAndPasswordConfirmationWithoutLogin};}();UOL.platform.fields.salesOrigin=function(){var utils=UOL.platform.utils;var MAX_SALES_AGENT=40;var MIN_SALES_STORE=3;var MAX_SALES_STORE=12;function checkSalesAgent(codSalesAgent){if(utils.isEmpty(codSalesAgent)){return new utils.ErrorMessage({code:4001601,error:"sales_agent_null",field:"codSalesAgent",message:"Por favor, informe o código do vendedor."});}if(utils.hasAnySpecialChar(codSalesAgent)){return new utils.ErrorMessage({code:4001602,error:"sales_agent_has_invalid_chars",field:"codSalesAgent",message:"Por favor, informe um código do vendedor com caracteres válidos."});}if(utils.isTextMoreThan(codSalesAgent,MAX_SALES_AGENT)){return new utils.ErrorMessage({code:4001603,error:"sales_agent_too_long",field:"codSalesAgent",message:"Por favor, informe um código do vendedor com no máximo "+MAX_SALES_AGENT+" caracteres."});}}function checkSalesStore(codSalesStore){if(utils.isEmpty(codSalesStore)){return new utils.ErrorMessage({code:4001604,error:"sales_store_null",field:"codSalesStore",message:"Por favor, informe o código da loja."});}if(!utils.isNumeric(codSalesStore)){return new utils.ErrorMessage({code:4001605,error:"sales_store_is_not_numeric",field:"codSalesStore",message:"Por favor, preencha o código da loja com caracteres numéricos."});}if(utils.isTextLessThan(codSalesStore,MIN_SALES_STORE)){return new utils.ErrorMessage({code:4001606,error:"sales_store_too_short",field:"codSalesStore",message:"Por favor, informe um código da loja com no mínimo "+MIN_SALES_STORE+" caracteres."});}if(utils.isTextMoreThan(codSalesStore,MAX_SALES_STORE)){return new utils.ErrorMessage({code:4001607,error:"sales_store_too_long",field:"codSalesStore",message:"Por favor, informe um código da loja com no máximo "+MAX_SALES_STORE+" caracteres."});}}function check(codSalesAgent,codSalesStore){var returnSalesAgent=checkSalesAgent(codSalesAgent);var returnSalesStore=checkSalesStore(codSalesStore);if(typeof returnSalesAgent!=="undefined"){return returnSalesAgent;}if(typeof returnSalesStore!=="undefined"){return returnSalesStore;}}return{check:check};}();UOL.platform.fields.stateTax=function(){var utils=UOL.platform.utils;var acreValidator=UOL.platform.fields.acreStateTax;var alagoasValidator=UOL.platform.fields.alagoasStateTax;var amapaValidator=UOL.platform.fields.amapaStateTax;var bahiaValidator=UOL.platform.fields.bahiaStateTax;var dfValidator=UOL.platform.fields.dfStateTax;var goiasValidator=UOL.platform.fields.goiasStateTax;var maranhaoValidator=UOL.platform.fields.maranhaoStateTax;var matoGrossoValidator=UOL.platform.fields.matoGrossoStateTax;var matoGrossoSulValidator=UOL.platform.fields.matoGrossoSulStateTax;var minasGeraisValidator=UOL.platform.fields.minasGeraisStateTax;var paraValidator=UOL.platform.fields.paraStateTax;var paranaValidator=UOL.platform.fields.paranaStateTax;var pernambucoValidator=UOL.platform.fields.pernambucoStateTax;var rioJaneiroValidator=UOL.platform.fields.rioJaneiroStateTax;var rioGrandeNorteValidator=UOL.platform.fields.rioGrandeNorteStateTax;var rioGrandeSulValidator=UOL.platform.fields.rioGrandeSulStateTax;var rondoniaValidator=UOL.platform.fields.rondoniaStateTax;var roraimaValidator=UOL.platform.fields.roraimaStateTax;var saoPauloValidator=UOL.platform.fields.saoPauloStateTax;var tocantinsValidator=UOL.platform.fields.tocantinsStateTax;var commonValidator=UOL.platform.fields.commonStateTax;function isValidStateTaxUF(sourceNumber,uf){var number=utils.getDigits(sourceNumber);var checkNumber=number.split("");var standardWeights=[9,8,7,6,5,4,3,2];switch(uf){case"AC":return acreValidator.validate(checkNumber);case"AL":return alagoasValidator.validate(checkNumber,standardWeights);case"AP":return amapaValidator.validate(checkNumber,standardWeights);case"BA":return bahiaValidator.validate(number,checkNumber,standardWeights);case"DF":return dfValidator.validate(checkNumber);case"GO":return goiasValidator.validate(number,checkNumber,standardWeights);case"MA":return maranhaoValidator.validate(checkNumber,standardWeights);case"MT":return matoGrossoValidator.validate(checkNumber);case"MS":return matoGrossoSulValidator.validate(checkNumber,standardWeights);case"MG":return minasGeraisValidator.validate(number,checkNumber);case"PA":return paraValidator.validate(checkNumber,standardWeights);case"PR":return paranaValidator.validate(checkNumber);case"PE":return pernambucoValidator.validate(checkNumber);case"RJ":return rioJaneiroValidator.validate(checkNumber);case"RN":return rioGrandeNorteValidator.validate(checkNumber);case"RS":return rioGrandeSulValidator.validate(checkNumber);case"RO":return rondoniaValidator.validate(checkNumber);case"RR":return roraimaValidator.validate(checkNumber);case"SP":return saoPauloValidator.validate(sourceNumber,checkNumber);case"TO":return tocantinsValidator.validate(checkNumber);case"SE":case"SC":case"PI":case"PB":case"ES":case"CE":case"AM":return commonValidator.validate(checkNumber,standardWeights);default:return false;}}function check(stateTaxNumber,uf){if(utils.isEmpty(uf)){return new utils.ErrorMessage({code:4001001,error:"stateTaxUf_null",field:"stateTaxUf",message:"Por favor, informe um estado para inscrição estadual."});}if(!uf.match(/^(AC|AL|AP|BA|DF|GO|MA|MT|MS|MG|PA|PR|PE|RJ|RN|RS|RO|RR|SP|TO|SE|SC|PI|PB|ES|CE|AM)$/)){return new utils.ErrorMessage({code:4001002,error:"stateTaxUf_does_not_exist",field:"stateTaxUf",message:"Por favor, informe um estado válido para inscrição estadual."});}if(utils.isEmpty(stateTaxNumber)){return new utils.ErrorMessage({code:4001003,error:"stateTaxNumber_null",field:"stateTaxNumber",message:"Por favor, informe uma inscrição estadual."});}if(!stateTaxNumber.match(/^P{0,1}[0-9\.\-\/]+$/)){return new utils.ErrorMessage({code:4001004,error:"stateTaxNumber_has_invalid_chars",field:"stateTaxNumber",message:"Por favor, informe uma inscrição estadual sem caracteres especiais."});}if(!isValidStateTaxUF(stateTaxNumber,uf)){return new utils.ErrorMessage({code:4001005,error:"stateTaxNumber_is_invalid",field:"stateTaxNumber",message:"Por favor, informe uma inscrição estadual válida."});}}return{check:check};}();UOL.platform.fields.telephone=function(){var utils=UOL.platform.utils;function isPhoneWithConsecutiveChars(phoneNumber){var regex=/\D{2,}/g;return regex.test(phoneNumber);}function isPhoneWithValidCharacter(phoneNumber){var regex=/^\d{4,5}[\.\-\s]?\d{4}$/;var resultado=regex.test(phoneNumber);return resultado;}function checkDDD(ddd){if(utils.isBlank(ddd)){return new utils.ErrorMessage({code:4000401,error:"ddd_null",field:"telephone",message:"Informe o DDD."});}if(!utils.isNumeric(ddd)){return new utils.ErrorMessage({code:4000402,error:"ddd_invalid_chars",field:"telephone",message:"DDD inválido. Verifique o código informado."});}if(ddd.length&lt;2){return new utils.ErrorMessage({code:4000403,error:"ddd_min_length",field:"telephone",message:"DDD inválido. Informe um código com dois algarismos."});}if(ddd.length&gt;2){return new utils.ErrorMessage({code:4000404,error:"ddd_max_length",field:"telephone",message:"DDD inválido. Informe um código com dois algarismos."});}return null;}function checkBasicPhoneValidations(ddd,phone){var dddErrorMessage=checkDDD(ddd);if(!utils.isNull(dddErrorMessage)){return dddErrorMessage;}if(utils.isBlank(phone)){return new utils.ErrorMessage({code:4000405,error:"telephone_null",field:"telephone",message:"Informe um telefone fixo."});}}function check(ddd,phone){var errorMessage=checkBasicPhoneValidations(ddd,phone);if(!utils.isNull(errorMessage)){return errorMessage;}else{if(utils.isTextLessThan(phone,8)){return new utils.ErrorMessage({code:4000406,error:"telephone_min_length",field:"telephone",message:"Telefone inválido. O número deve conter oito algarismos."});}else{if(utils.isTextMoreThan(phone,10)){return new utils.ErrorMessage({code:4000407,error:"telephone_max_length",field:"telephone",message:"Telefone inválido. O número deve conter oito algarismos."});}else{if(isPhoneWithConsecutiveChars(phone)){return new utils.ErrorMessage({code:4000408,error:"telephone_consecutive_chars",field:"telephone",message:"Telefone inválido. Verifique o número do telefone informado."});}else{if(!isPhoneWithValidCharacter(phone)){return new utils.ErrorMessage({code:4000409,error:"telephone_invalid_chars",field:"telephone",message:"Telefone inválido. Verifique o número do telefone informado."});}else{if(UOL.platform.fields.cellphone.isValidCellPhoneNumber(ddd,phone)){return new utils.ErrorMessage({code:4000410,error:"telephone_is_cellphone",field:"telephone",message:"O telefone informado é um celular. Informe neste campo um número de telefone fixo."});}}}}}}}return{check:check};}();</pre></body></html>