Lead #2167

Company
Barnett and Co Accountants
Website
http://barnettandco.com
Best Contact
Sumit Agarwal — owner
Email
enquiries@barnettandco.com (person)

Override

Captured Pages

Emails: enquiries@barnettandco.com, enquiry@dnsaccountants.co.uk
View text
24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com | enquiry@dnsaccountants.co.uk Book a consultation Home How we help Who we help Package About us Contact us Get in touch 01225 790224 03300 886 686 About us Know who we are Barnett and Co Accountants Barnett and Co Accountants in Melksham is committed to offering outstanding accounting services that are customised to the particular needs of our diverse clients. We have a strong reputation in the community and concentrate on offering excellent service that enables both individuals and businesses. Small businesses, startups, contractors, freelancers, landlords, and sole traders are just a few of the many industries in which our skilled staff specialises. We provide informed assistance to help successfully arrange these challenges since we understand the unique challenges that each sector encounters. Contact with us Expert people Dedicated team members Sumit Agarwal ACA, ACMA, ACA (India) Managing Director View bio Gaurav Sharma Branch Manager View bio Emily Doak Office Administrator View bio Rinki Pathak Account Manager View bio Mohit Tyagi Account Manager View bio Manmohan Kandpal (Mak) Account Manager View bio Gary Zouvani ACMA Group Operations Director View bio Siddharth Agarwal CTA, ACCA Senior Tax Manager View bio Sumit Agarwal ACA, ACMA, ACA (India) Managing Director Sumit serves as the Managing Director and is an experienced accounting professional specialising in advising owner-managed businesses. Since earning his Chartered Accountant credentials, he has empowered thousands of such businesses to thrive, skillfully guiding them through the financial intricacies of growth and expansion. Gaurav Sharma Branch Manager Gaurav has a proven track record in tax planning, adeptly identifying and executing strategies tailored to meet clients' unique needs. His deep commitment to understanding each client's business allows him to offer practical and personalized financial insights, making him a trusted advisor. He is highly skilled at analysing and optimizing organizational structures to ensure compliance, improve tax efficiencies, and support strategic growth. Gaurav takes pride in building lasting client relationships, blending his expertise with a genuine interest in helping clients achieve their business goals. By consistently evaluating entity structures, he ensures clients benefit from the most effective compliance and tax arrangements, empowering their businesses to thrive. Gary Zouvani ACMA Group Operations Director A qualified chartered management accountant with over 30 years’ experience working in industry and accountancy practice. Currently dns group operations director overseeing and supporting over 40 offices across the UK. Siddharth Agarwal CTA, ACCA Senior Tax Manager I am a Chartered Tax Advisor (OMB) and ACCA. I have 9+ years of experience in owner-managed business taxation issues, company reorganisations, property taxation, and succession planning. I also work with private clients on bespoke tax planning strategies for trusts, residence status, and non-residents. I aim to fullfil my professional duties towards my clients and keep them satisfied, my utmost priority. I believe in establishing and maintaining businesses and personal relationships as the key to mutual growth. Emily Doak Office Administrator As an Office Administrator at dns Accountants, I manage office operations and support staff to ensure smooth and efficient workflows. With a strong background in customer service, I bring a client-focused approach to my role, ensuring that clients and my work colleague’s receive my exceptional support. In addition to my professional role, I serve as a Sergeant Instructor for the Army Cadet Force, where I mentor and train young cadets in leadership, discipline, and various skills. This experience has honed my leadership abilities and reinforced my commitment to teamwork and personal development. Outside of work, I am passionate about yoga, which helps me maintain balance and well-being in my busy life. Practicing yoga not only keeps me physically fit but also enhances my mental clarity and focus. Rinki Pathak Account Manager I am an Account Manager with over 7 years of experience specialising in VAT, corporation tax, and year-end accounts. I have a strong track record of managing a diverse client portfolio, ensuring full compliance with HMRC regulations, and delivering tailored financial solutions to meet individual business needs. I am a qualified Cost and Management Accountant (CMA) from India and currently pursuing the ACCA at the professional level. My approach is rooted in reliability and efficiency, and I am committed to building lasting client relationships through clear communication and dependable service. Mohit Tyagi Account Manager An experienced tax and accounting professional with a proven ability to develop tailored financial strategies that help businesses navigate tax complexities, enhance compliance, and drive sustainable growth. Specialises in accounts management, tax planning, and financial forecasting, ensuring that clients optimise their tax positions while maintaining regulatory integrity. A trusted advisor, committed to delivering strategic financial insights that empower businesses to succeed. Manmohan Kandpal (Mak) Account Manager Manmohan, known as Mak, is an experienced Account Manager with over 14 years in finance and accounting across the UK, India, APAC, EMEA, and the USA. At Barnett and Co Accountants Ltd, he manages a diverse portfolio, delivering services such as bookkeeping, VAT returns, payroll, CIS, year-end accounts, corporation tax, and self-assessment tax returns. With a background in both practice and industry, Mak brings in-depth expertise in general accounting, financial reporting, tax planning, and company secretarial compliance. He is proficient in software including Sage, Xero, QuickBooks, Nomisma, and MS Dynamics 365. Mak holds an MBA in Finance from Bristol Business School (UWE), is a qualified Company Secretary, and is currently pursuing ACCA to become a Chartered Accountant. FAQ's Frequently asked questions What is Barnett and Co Accountants? Barnett and Co Accountants is a reputable advisory firm based in Melksham, specialising in accounting and financial services for individuals and businesses. Who can benefit from your services? Individuals and businesses across various sectors can benefit from Barnett and Co Accountants services. How do you help clients to save money? We help clients save money by providing expert tax planning, financial advice, and customised accounting services that optimise their financial efficiency. How can you help my business grow? Barnett and Co Accountants helps businesses grow by providing customised financial advice, strategic planning, and expert accounting services that increase operational efficiency and profitability. We use cookies to provide you with a better browsing experience and functionality if you give us consent. Terms & Conditions | Privacy Policy Decline Accept .cookies-sty { background-color: #424242; margin: 0px 7px; border-radius: 10px; position: fixed; z-index: 99999; bottom: 5px; width: 99%; padding: 20px 14px 19px 14px; } .cookies-sty-p { line-height: 38px; } @media screen and (max-width: 768px) { .cookies-sty-p { line-height: 18px; } .cookies-sty { width: 97%; } } Based in Melksham, Barnett and Co Accountants, trading as dns accountants, is proud to be part of the dns accountants network—one of the UK’s leading accountancy and tax advisory firms. We are building a strong regional reputation through our commitment to exceptional client service and practical financial advice. Quick links Home About Us How we help Who we help Package Contact us Terms & conditions Privacy policy Contact us 24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com enquiry@dnsaccountants.co.uk 01225 790224 | 03300 886 686 Copyright 2025 © Barnett and Co Accountants Limited, trading as dns accountants. | All right reserved. Company number -09960907 // Create cookie function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } // Delete cookie function deleteCookie(cname) { const d = new Date(); d.setTime(d.getTime() + (24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=;" + expires + ";path=/"; } // Read cookie function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for (let i = 0; i < ca.length; i++) { let c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } // Set cookie consent function acceptCookieConsent() { deleteCookie('user_cookie_consent'); setCookie('user_cookie_consent', 1, 30); document.getElementById("cookieNotice").style.display = "none"; } let cookie_consent = getCookie("user_cookie_consent"); if (cookie_consent != "") { document.getElementById("cookieNotice").style.display = "none"; } else { document.getElementById("cookieNotice").style.display = "block"; } function acceptCookie() { Cookies.set('accept_cookie', 'yes', { expires: 30 }); $('.cookies-sty').css('display', 'none'); } $(document).ready(function() { var myCookieValue = Cookies.get('accept_cookie'); if (myCookieValue == 'yes') { $('.cookies-sty').css('display', 'none'); } else { $('.cookies-sty').css('display', 'block'); } }) $('#decline-cookies-btn').on('click', function() { $('.cookies-sty').css('display', 'none'); }); $('.popup-decline').on('click', function() { $('.cookie-sub-popup').modal('hide'); $('.cookies-sty').css('display', 'none'); }); $('#accept-cookies-btn').on('click', function() { acceptCookie(); }); $('.popup-accept').on('click', function() { $('.cookie-sub-popup').modal('hide'); acceptCookie(); }); // form // $Id: $ function zf_ValidateAndSubmit() { if (zf_CheckMandatory()) { if (zf_ValidCheck()) { if (isSalesIQIntegrationEnabled) { zf_addDataToSalesIQ(); } return true; } else { return false; } } else { return false; } } function zf_CheckMandatory() { for (i = 0; i < zf_MandArray.length; i++) { var fieldObj = document.forms.form[zf_MandArray[i]]; if (fieldObj) { if (fieldObj.nodeName != null) { if (fieldObj.nodeName == 'OBJECT') { if (!zf_MandatoryCheckSignature(fieldObj)) { zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (((fieldObj.value).replace(/^\s+|\s+$/g, '')).length == 0) { if (fieldObj.type == 'file') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } else if (fieldObj.nodeName == 'SELECT') { // No I18N if (fieldObj.options[fieldObj.selectedIndex].value == '-Select-') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (fieldObj.type == 'checkbox' || fieldObj.type == 'radio') { if (fieldObj.checked == false) { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } else { var checkedValsCount = 0; var inpChoiceElems = fieldObj; for (var ii = 0; ii < inpChoiceElems.length; ii++) { if (inpChoiceElems[ii].checked === true) { checkedValsCount++; } } if (checkedValsCount == 0) { inpChoiceElems[0].focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } } return true; } function zf_ValidCheck() { var isValid = true; for (ind = 0; ind < zf_FieldArray.length; ind++) { var fieldObj = document.forms.form[zf_FieldArray[ind]]; if (fieldObj) { if (fieldObj.nodeName != null) { var checkType = fieldObj.getAttribute("checktype"); if (checkType == "c2") { // No I18N if (!zf_ValidateNumber(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c3") { // No I18N if (!zf_ValidateCurrency(fieldObj) || !zf_ValidateDecimalLength(fieldObj, 10)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c4") { // No I18N if (!zf_ValidateDateFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c5") { // No I18N if (!zf_ValidateEmailID(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c6") { // No I18N if (!zf_ValidateLiveUrl(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c7") { // No I18N if (!zf_ValidatePhone(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c8") { // No I18N zf_ValidateSignature(fieldObj); } else if (checkType == "c9") { // No I18N if (!zf_ValidateMonthYearFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } } } } return isValid; } function zf_ShowErrorMsg(uniqName) { var fldLinkName; for (errInd = 0; errInd < zf_FieldArray.length; errInd++) { fldLinkName = zf_FieldArray[errInd].split('_')[0]; document.getElementById(fldLinkName + "_error").style.display = 'none'; } var linkName = uniqName.split('_')[0]; document.getElementById(linkName + "_error").style.display = 'block'; } function zf_ValidateNumber(elem) { var validChars = "-0123456789"; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue != null && !numValue == "") { var strChar; var result = true; if (numValue.charAt(0) == "-" && numValue.length == 1) { return false; } for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if ((strChar == "-") && (i != 0)) { return false; } if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDateFormat(inpElem) { var dateValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (dateValue == "") { return true; } else { return (zf_DateRegex.test(dateValue)); } } function zf_ValidateCurrency(elem) { var validChars = "0123456789."; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue.charAt(0) == '-') { numValue = numValue.substring(1, numValue.length); } if (numValue != null && !numValue == "") { var strChar; var result = true; for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDecimalLength(elem, decimalLen) { var numValue = elem.value; if (numValue.indexOf('.') >= 0) { var decimalLength = numValue.substring(numValue.indexOf('.') + 1).length; if (decimalLength > decimalLen) { return false; } else { return true; } } return true; } function zf_ValidateEmailID(elem) { var check = 0; var emailValue = elem.value; if (emailValue != null && !emailValue == "") { var emailArray = emailValue.split(","); for (i = 0; i < emailArray.length; i++) { var emailExp = /^[\w]([\w\-.+&'/]*)@([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,22}$/; if (!emailExp.test(emailArray[i].replace(/^\s+|\s+$/g, ''))) { check = 1; } } if (check == 0) { return true; } else { return false; } } else { return true; } } function zf_ValidateLiveUrl(elem) { var urlValue = elem.value; if (urlValue !== null && typeof(urlValue) !== "undefined") { urlValue = urlValue.replace(/^\s+|\s+$/g, ''); if (urlValue !== "") { var urlregex = new RegExp("^(((https|http|ftps|ftp)://[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*)+(:\\d{1,5})?)|((w|W){3}(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*){2,}(:\\d{1,5})?)|([a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*)+(:\\d{1,5})?))(/[-\\w.?,:'/\\\\+=&;%$#@()!~]*)?$", "i"); // This regex is taken from LiveFieldsUtil.isValidWebSiteFieldURL() method. Changes: i) Add ^ at the beginning and $ at the end. ii) Remove ?i before https and adjust () around https. iii) Add "i" in the RegExp constructor. // No I18N return (urlregex.test(urlValue)); } } return true; } function zf_ValidatePhone(inpElem) { var ZFPhoneRegex = { PHONE_INTE_ALL_REG: /^[+]{0,1}[()0-9-. ]+$/, PHONE_INTE_NUMERIC_REG: /^[0-9]+$/, PHONE_INTE_CONT_CODE_ENABLED_REG: /^[(0-9-.][()0-9-. ]*$/, PHONE_USA_REG: /^[0-9]+$/, PHONE_CONT_CODE_REG: /^[+][0-9]{1,4}$/ } var phoneFormat = parseInt(inpElem.getAttribute("phoneFormat")); var fieldInpVal = inpElem.value.replace(/^\s+|\s+$/g, ''); var toReturn = true; if (phoneFormat === 1) { if (inpElem.getAttribute("valType") == 'code') { var codeRexp = ZFPhoneRegex.PHONE_CONT_CODE_REG; if (fieldInpVal != "" && !codeRexp.test(fieldInpVal)) { return false; } } else { var IRexp = ZFPhoneRegex.PHONE_INTE_ALL_REG; if (inpElem.getAttribute("phoneFormatType") == '2') { IRexp = ZFPhoneRegex.PHONE_INTE_NUMERIC_REG; } if (fieldInpVal != "" && !IRexp.test(fieldInpVal)) { toReturn = false; return toReturn; } } return toReturn; } else if (phoneFormat === 2) { var InpMaxlength = inpElem.getAttribute("maxlength"); var USARexp = ZFPhoneRegex.PHONE_USA_REG; if (fieldInpVal != "" && USARexp.test(fieldInpVal) && fieldInpVal.length == InpMaxlength) { toReturn = true; } else if (fieldInpVal == "") { toReturn = true; } else { toReturn = false; } return toReturn; } } function zf_ValidateSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValidSign = zf_IsSignaturePresent(objElem, linkName, canvasElem); var hiddenSignInputElem = document.getElementById("hiddenSignInput-" + linkName); if (isValidSign) { hiddenSignInputElem.value = canvasElem.toDataURL(); } else { hiddenSignInputElem.value = ""; // No I18N } return isValidSign; } function zf_MandatoryCheckSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValid = zf_IsSignaturePresent(objElem, linkName, canvasElem); return isValid; } function zf_IsSignaturePresent(objElem, linkName, canvasElem) { var context = canvasElem.getContext('2d'); // No I18N var canvasWidth = canvasElem.width; var canvasHeight = canvasElem.height; var canvasData = context.getImageData(0, 0, canvasWidth, canvasHeight); var signLen = canvasData.data.length; var flag = false; for (var index = 0; index < signLen; index++) { if (!canvasData.data[index]) { flag = false; } else if (canvasData.data[index]) { flag = true; break; } } return flag; } function zf_FocusNext(elem, event) { if (event.keyCode == 9 || event.keyCode == 16) { return; } if (event.keyCode >= 37 && event.keyCode <= 40) { return; } var compname = elem.getAttribute("compname"); var inpElemName = elem.getAttribute("name"); if (inpElemName == compname + "_countrycode") { if (elem.value.length == 3) { document.getElementsByName(compname + "_first")[0].focus(); } } else if (inpElemName == compname + "_first") { if (elem.value.length == 3) { document.getElementsByName(compname + "_second")[0].focus(); } } } function zf_ValidateMonthYearFormat(inpElem) { var monthYearValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (monthYearValue == "") { return true; } else { return (zf_MonthYearRegex.test(monthYearValue)); } }
Emails: enquiries@barnettandco.com, enquiry@dnsaccountants.co.uk
View text
24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com | enquiry@dnsaccountants.co.uk Book a consultation Home How we help Who we help Package About us Contact us Get in touch 01225 790224 03300 886 686 Contact us Phone 01225 790224 03300 886 686 Mail us enquiries@barnettandco.com enquiry@dnsaccountants.co.uk Address 24A High Street, Melksham, Wiltshire, SN12 6LA We use cookies to provide you with a better browsing experience and functionality if you give us consent. Terms & Conditions | Privacy Policy Decline Accept .cookies-sty { background-color: #424242; margin: 0px 7px; border-radius: 10px; position: fixed; z-index: 99999; bottom: 5px; width: 99%; padding: 20px 14px 19px 14px; } .cookies-sty-p { line-height: 38px; } @media screen and (max-width: 768px) { .cookies-sty-p { line-height: 18px; } .cookies-sty { width: 97%; } } Based in Melksham, Barnett and Co Accountants, trading as dns accountants, is proud to be part of the dns accountants network—one of the UK’s leading accountancy and tax advisory firms. We are building a strong regional reputation through our commitment to exceptional client service and practical financial advice. Quick links Home About Us How we help Who we help Package Contact us Terms & conditions Privacy policy Contact us 24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com enquiry@dnsaccountants.co.uk 01225 790224 | 03300 886 686 Copyright 2025 © Barnett and Co Accountants Limited, trading as dns accountants. | All right reserved. Company number -09960907 // Create cookie function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } // Delete cookie function deleteCookie(cname) { const d = new Date(); d.setTime(d.getTime() + (24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=;" + expires + ";path=/"; } // Read cookie function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for (let i = 0; i < ca.length; i++) { let c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } // Set cookie consent function acceptCookieConsent() { deleteCookie('user_cookie_consent'); setCookie('user_cookie_consent', 1, 30); document.getElementById("cookieNotice").style.display = "none"; } let cookie_consent = getCookie("user_cookie_consent"); if (cookie_consent != "") { document.getElementById("cookieNotice").style.display = "none"; } else { document.getElementById("cookieNotice").style.display = "block"; } function acceptCookie() { Cookies.set('accept_cookie', 'yes', { expires: 30 }); $('.cookies-sty').css('display', 'none'); } $(document).ready(function() { var myCookieValue = Cookies.get('accept_cookie'); if (myCookieValue == 'yes') { $('.cookies-sty').css('display', 'none'); } else { $('.cookies-sty').css('display', 'block'); } }) $('#decline-cookies-btn').on('click', function() { $('.cookies-sty').css('display', 'none'); }); $('.popup-decline').on('click', function() { $('.cookie-sub-popup').modal('hide'); $('.cookies-sty').css('display', 'none'); }); $('#accept-cookies-btn').on('click', function() { acceptCookie(); }); $('.popup-accept').on('click', function() { $('.cookie-sub-popup').modal('hide'); acceptCookie(); }); // form // $Id: $ function zf_ValidateAndSubmit() { if (zf_CheckMandatory()) { if (zf_ValidCheck()) { if (isSalesIQIntegrationEnabled) { zf_addDataToSalesIQ(); } return true; } else { return false; } } else { return false; } } function zf_CheckMandatory() { for (i = 0; i < zf_MandArray.length; i++) { var fieldObj = document.forms.form[zf_MandArray[i]]; if (fieldObj) { if (fieldObj.nodeName != null) { if (fieldObj.nodeName == 'OBJECT') { if (!zf_MandatoryCheckSignature(fieldObj)) { zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (((fieldObj.value).replace(/^\s+|\s+$/g, '')).length == 0) { if (fieldObj.type == 'file') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } else if (fieldObj.nodeName == 'SELECT') { // No I18N if (fieldObj.options[fieldObj.selectedIndex].value == '-Select-') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (fieldObj.type == 'checkbox' || fieldObj.type == 'radio') { if (fieldObj.checked == false) { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } else { var checkedValsCount = 0; var inpChoiceElems = fieldObj; for (var ii = 0; ii < inpChoiceElems.length; ii++) { if (inpChoiceElems[ii].checked === true) { checkedValsCount++; } } if (checkedValsCount == 0) { inpChoiceElems[0].focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } } return true; } function zf_ValidCheck() { var isValid = true; for (ind = 0; ind < zf_FieldArray.length; ind++) { var fieldObj = document.forms.form[zf_FieldArray[ind]]; if (fieldObj) { if (fieldObj.nodeName != null) { var checkType = fieldObj.getAttribute("checktype"); if (checkType == "c2") { // No I18N if (!zf_ValidateNumber(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c3") { // No I18N if (!zf_ValidateCurrency(fieldObj) || !zf_ValidateDecimalLength(fieldObj, 10)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c4") { // No I18N if (!zf_ValidateDateFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c5") { // No I18N if (!zf_ValidateEmailID(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c6") { // No I18N if (!zf_ValidateLiveUrl(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c7") { // No I18N if (!zf_ValidatePhone(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c8") { // No I18N zf_ValidateSignature(fieldObj); } else if (checkType == "c9") { // No I18N if (!zf_ValidateMonthYearFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } } } } return isValid; } function zf_ShowErrorMsg(uniqName) { var fldLinkName; for (errInd = 0; errInd < zf_FieldArray.length; errInd++) { fldLinkName = zf_FieldArray[errInd].split('_')[0]; document.getElementById(fldLinkName + "_error").style.display = 'none'; } var linkName = uniqName.split('_')[0]; document.getElementById(linkName + "_error").style.display = 'block'; } function zf_ValidateNumber(elem) { var validChars = "-0123456789"; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue != null && !numValue == "") { var strChar; var result = true; if (numValue.charAt(0) == "-" && numValue.length == 1) { return false; } for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if ((strChar == "-") && (i != 0)) { return false; } if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDateFormat(inpElem) { var dateValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (dateValue == "") { return true; } else { return (zf_DateRegex.test(dateValue)); } } function zf_ValidateCurrency(elem) { var validChars = "0123456789."; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue.charAt(0) == '-') { numValue = numValue.substring(1, numValue.length); } if (numValue != null && !numValue == "") { var strChar; var result = true; for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDecimalLength(elem, decimalLen) { var numValue = elem.value; if (numValue.indexOf('.') >= 0) { var decimalLength = numValue.substring(numValue.indexOf('.') + 1).length; if (decimalLength > decimalLen) { return false; } else { return true; } } return true; } function zf_ValidateEmailID(elem) { var check = 0; var emailValue = elem.value; if (emailValue != null && !emailValue == "") { var emailArray = emailValue.split(","); for (i = 0; i < emailArray.length; i++) { var emailExp = /^[\w]([\w\-.+&'/]*)@([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,22}$/; if (!emailExp.test(emailArray[i].replace(/^\s+|\s+$/g, ''))) { check = 1; } } if (check == 0) { return true; } else { return false; } } else { return true; } } function zf_ValidateLiveUrl(elem) { var urlValue = elem.value; if (urlValue !== null && typeof(urlValue) !== "undefined") { urlValue = urlValue.replace(/^\s+|\s+$/g, ''); if (urlValue !== "") { var urlregex = new RegExp("^(((https|http|ftps|ftp)://[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*)+(:\\d{1,5})?)|((w|W){3}(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*){2,}(:\\d{1,5})?)|([a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*)+(:\\d{1,5})?))(/[-\\w.?,:'/\\\\+=&;%$#@()!~]*)?$", "i"); // This regex is taken from LiveFieldsUtil.isValidWebSiteFieldURL() method. Changes: i) Add ^ at the beginning and $ at the end. ii) Remove ?i before https and adjust () around https. iii) Add "i" in the RegExp constructor. // No I18N return (urlregex.test(urlValue)); } } return true; } function zf_ValidatePhone(inpElem) { var ZFPhoneRegex = { PHONE_INTE_ALL_REG: /^[+]{0,1}[()0-9-. ]+$/, PHONE_INTE_NUMERIC_REG: /^[0-9]+$/, PHONE_INTE_CONT_CODE_ENABLED_REG: /^[(0-9-.][()0-9-. ]*$/, PHONE_USA_REG: /^[0-9]+$/, PHONE_CONT_CODE_REG: /^[+][0-9]{1,4}$/ } var phoneFormat = parseInt(inpElem.getAttribute("phoneFormat")); var fieldInpVal = inpElem.value.replace(/^\s+|\s+$/g, ''); var toReturn = true; if (phoneFormat === 1) { if (inpElem.getAttribute("valType") == 'code') { var codeRexp = ZFPhoneRegex.PHONE_CONT_CODE_REG; if (fieldInpVal != "" && !codeRexp.test(fieldInpVal)) { return false; } } else { var IRexp = ZFPhoneRegex.PHONE_INTE_ALL_REG; if (inpElem.getAttribute("phoneFormatType") == '2') { IRexp = ZFPhoneRegex.PHONE_INTE_NUMERIC_REG; } if (fieldInpVal != "" && !IRexp.test(fieldInpVal)) { toReturn = false; return toReturn; } } return toReturn; } else if (phoneFormat === 2) { var InpMaxlength = inpElem.getAttribute("maxlength"); var USARexp = ZFPhoneRegex.PHONE_USA_REG; if (fieldInpVal != "" && USARexp.test(fieldInpVal) && fieldInpVal.length == InpMaxlength) { toReturn = true; } else if (fieldInpVal == "") { toReturn = true; } else { toReturn = false; } return toReturn; } } function zf_ValidateSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValidSign = zf_IsSignaturePresent(objElem, linkName, canvasElem); var hiddenSignInputElem = document.getElementById("hiddenSignInput-" + linkName); if (isValidSign) { hiddenSignInputElem.value = canvasElem.toDataURL(); } else { hiddenSignInputElem.value = ""; // No I18N } return isValidSign; } function zf_MandatoryCheckSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValid = zf_IsSignaturePresent(objElem, linkName, canvasElem); return isValid; } function zf_IsSignaturePresent(objElem, linkName, canvasElem) { var context = canvasElem.getContext('2d'); // No I18N var canvasWidth = canvasElem.width; var canvasHeight = canvasElem.height; var canvasData = context.getImageData(0, 0, canvasWidth, canvasHeight); var signLen = canvasData.data.length; var flag = false; for (var index = 0; index < signLen; index++) { if (!canvasData.data[index]) { flag = false; } else if (canvasData.data[index]) { flag = true; break; } } return flag; } function zf_FocusNext(elem, event) { if (event.keyCode == 9 || event.keyCode == 16) { return; } if (event.keyCode >= 37 && event.keyCode <= 40) { return; } var compname = elem.getAttribute("compname"); var inpElemName = elem.getAttribute("name"); if (inpElemName == compname + "_countrycode") { if (elem.value.length == 3) { document.getElementsByName(compname + "_first")[0].focus(); } } else if (inpElemName == compname + "_first") { if (elem.value.length == 3) { document.getElementsByName(compname + "_second")[0].focus(); } } } function zf_ValidateMonthYearFormat(inpElem) { var monthYearValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (monthYearValue == "") { return true; } else { return (zf_MonthYearRegex.test(monthYearValue)); } }
Emails: enquiries@barnettandco.com, enquiry@dnsaccountants.co.uk
View text
24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com | enquiry@dnsaccountants.co.uk Book a consultation Home How we help Who we help Package About us Contact us Get in touch 01225 790224 03300 886 686 Expert accounting solutions for your business Accurate, transparent, and efficient accounting solutions At Barnett and Co Accountants, trading as dns accountants, we provide expert accounting services to help businesses and individuals maintain accurate records, ensure compliance, and simplify accounting processes. Speak to a tax expert About company Your trusted accounting partner for growth and success Based in Melksham, Barnett and Co Accountants is establishing a strong regional reputation. We are dedicated to delivering exceptional service that meets all our clients' needs. Our wide range of specialisations allows us to offer professional guidance to people as well as serve numerous enterprises in a variety of industries. We believe our extensive experience can help your business achieve its goals. Together, we try for success, helping growth for both your business and ours. Read more How we help Services Bookkeeping Accurate bookkeeping for your business success. Payroll Easy payroll management for your business. Self assessment Easier tax returns for self-assessment. VAT returns Easier vat returns for your business. Property tax Professional property tax assistance for you. Company formation Easy company formation for your business. View more Get in touch with our team today Do you need help or have questions? Get in touch with us right now, and our team will be happy to assist you. Who we help Created by accountants just for you Accountants for small businesses At Barnett and Co Accountants, we recognise the unique challenges small businesses face. Our dedicated accountants offer customised solutions to help you manage your finances effectively and efficiently. Accountants for startups For startups, Barnett and Co Accountants, provides specialised financial advice. Our customised accounting services will help your startup expand and give you the know-how you need to succeed. Accountants for contractors Contractors face certain financial difficulties, which Barnett and Co Accountants is prepared to handle. We provide services that are specially made for contractors, such as account management and complete submission to IR35 rules. Accountants for freelancers Barnett and Co Accountants, specialise in services customised specifically for freelancers because they require flexible accounting solutions. We offer specialised solutions to assist you in efficiently managing your finances since we recognise the particular difficulties associated with dealing with varying incomes. View more Our testimonials What our clients say “ From 1980, we have had and continue to have a complicated international requirement for accounting purposes from Barnett predecessor company Peter Barclay. We remain comfortable with the effective and efficient service we receive from parent company dns. " Jock Mackenzie “ Both my husband and I have been using this excellent company for many years and recently they have become even better! The staff is extremely helpful, always available when you need them, they deal with anything very efficiently and quickly. The customer service is one of the best we have ever experienced, the staff is really friendly and professional. Our thanks go especially to Gaurav who has several times gone out of his way to help us with issues which we couldn't have dealt with easily. But everyone we had contact with in this firm has been outstandingly helpful and we coudn't recommend them enough. " Dagmar Eberhardt “ Barnett & Co are a pleasure to deal with. Always fast and efficient. Special thanks to Rinki Pathak who always keeps us informed and is very quick to reply to any questions. " Steve McKechnie “ Barnett and Co have looked after my accounts for years. The recent change in ownership has continued the excellent, friendly and quick service provided before. " Trudi Stevens FAQ's Frequently asked questions What accounting services do you offer? At Barnett and Co Accountants, we provide a range of accounting services, including tax planning, limited company support, and company formation, customised to meet your specific needs. . How can you help me save on taxes? Our experts will work with you to identify tax-saving opportunities within UK tax laws, helping to reduce your individual or business tax liabilities effectively. Can you assist with starting a company? Yes, we offer support for starting a company. We ensure all legal requirements are met and guide you through the entire process. How do I get started? To begin, simply contact us for a consultation. We’ll discuss your needs and explore how we can assist you in achieving your financial goals. We use cookies to provide you with a better browsing experience and functionality if you give us consent. Terms & Conditions | Privacy Policy Decline Accept .cookies-sty { background-color: #424242; margin: 0px 7px; border-radius: 10px; position: fixed; z-index: 99999; bottom: 5px; width: 99%; padding: 20px 14px 19px 14px; } .cookies-sty-p { line-height: 38px; } @media screen and (max-width: 768px) { .cookies-sty-p { line-height: 18px; } .cookies-sty { width: 97%; } } Based in Melksham, Barnett and Co Accountants, trading as dns accountants, is proud to be part of the dns accountants network—one of the UK’s leading accountancy and tax advisory firms. We are building a strong regional reputation through our commitment to exceptional client service and practical financial advice. Quick links Home About Us How we help Who we help Package Contact us Terms & conditions Privacy policy Contact us 24A High Street, Melksham, Wiltshire, SN12 6LA enquiries@barnettandco.com enquiry@dnsaccountants.co.uk 01225 790224 | 03300 886 686 Copyright 2025 © Barnett and Co Accountants Limited, trading as dns accountants. | All right reserved. Company number -09960907 // Create cookie function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } // Delete cookie function deleteCookie(cname) { const d = new Date(); d.setTime(d.getTime() + (24 * 60 * 60 * 1000)); let expires = "expires=" + d.toUTCString(); document.cookie = cname + "=;" + expires + ";path=/"; } // Read cookie function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for (let i = 0; i < ca.length; i++) { let c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } // Set cookie consent function acceptCookieConsent() { deleteCookie('user_cookie_consent'); setCookie('user_cookie_consent', 1, 30); document.getElementById("cookieNotice").style.display = "none"; } let cookie_consent = getCookie("user_cookie_consent"); if (cookie_consent != "") { document.getElementById("cookieNotice").style.display = "none"; } else { document.getElementById("cookieNotice").style.display = "block"; } function acceptCookie() { Cookies.set('accept_cookie', 'yes', { expires: 30 }); $('.cookies-sty').css('display', 'none'); } $(document).ready(function() { var myCookieValue = Cookies.get('accept_cookie'); if (myCookieValue == 'yes') { $('.cookies-sty').css('display', 'none'); } else { $('.cookies-sty').css('display', 'block'); } }) $('#decline-cookies-btn').on('click', function() { $('.cookies-sty').css('display', 'none'); }); $('.popup-decline').on('click', function() { $('.cookie-sub-popup').modal('hide'); $('.cookies-sty').css('display', 'none'); }); $('#accept-cookies-btn').on('click', function() { acceptCookie(); }); $('.popup-accept').on('click', function() { $('.cookie-sub-popup').modal('hide'); acceptCookie(); }); // form // $Id: $ function zf_ValidateAndSubmit() { if (zf_CheckMandatory()) { if (zf_ValidCheck()) { if (isSalesIQIntegrationEnabled) { zf_addDataToSalesIQ(); } return true; } else { return false; } } else { return false; } } function zf_CheckMandatory() { for (i = 0; i < zf_MandArray.length; i++) { var fieldObj = document.forms.form[zf_MandArray[i]]; if (fieldObj) { if (fieldObj.nodeName != null) { if (fieldObj.nodeName == 'OBJECT') { if (!zf_MandatoryCheckSignature(fieldObj)) { zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (((fieldObj.value).replace(/^\s+|\s+$/g, '')).length == 0) { if (fieldObj.type == 'file') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } else if (fieldObj.nodeName == 'SELECT') { // No I18N if (fieldObj.options[fieldObj.selectedIndex].value == '-Select-') { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } else if (fieldObj.type == 'checkbox' || fieldObj.type == 'radio') { if (fieldObj.checked == false) { fieldObj.focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } else { var checkedValsCount = 0; var inpChoiceElems = fieldObj; for (var ii = 0; ii < inpChoiceElems.length; ii++) { if (inpChoiceElems[ii].checked === true) { checkedValsCount++; } } if (checkedValsCount == 0) { inpChoiceElems[0].focus(); zf_ShowErrorMsg(zf_MandArray[i]); return false; } } } } return true; } function zf_ValidCheck() { var isValid = true; for (ind = 0; ind < zf_FieldArray.length; ind++) { var fieldObj = document.forms.form[zf_FieldArray[ind]]; if (fieldObj) { if (fieldObj.nodeName != null) { var checkType = fieldObj.getAttribute("checktype"); if (checkType == "c2") { // No I18N if (!zf_ValidateNumber(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c3") { // No I18N if (!zf_ValidateCurrency(fieldObj) || !zf_ValidateDecimalLength(fieldObj, 10)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c4") { // No I18N if (!zf_ValidateDateFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c5") { // No I18N if (!zf_ValidateEmailID(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c6") { // No I18N if (!zf_ValidateLiveUrl(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c7") { // No I18N if (!zf_ValidatePhone(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } else if (checkType == "c8") { // No I18N zf_ValidateSignature(fieldObj); } else if (checkType == "c9") { // No I18N if (!zf_ValidateMonthYearFormat(fieldObj)) { isValid = false; fieldObj.focus(); zf_ShowErrorMsg(zf_FieldArray[ind]); return false; } } } } } return isValid; } function zf_ShowErrorMsg(uniqName) { var fldLinkName; for (errInd = 0; errInd < zf_FieldArray.length; errInd++) { fldLinkName = zf_FieldArray[errInd].split('_')[0]; document.getElementById(fldLinkName + "_error").style.display = 'none'; } var linkName = uniqName.split('_')[0]; document.getElementById(linkName + "_error").style.display = 'block'; } function zf_ValidateNumber(elem) { var validChars = "-0123456789"; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue != null && !numValue == "") { var strChar; var result = true; if (numValue.charAt(0) == "-" && numValue.length == 1) { return false; } for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if ((strChar == "-") && (i != 0)) { return false; } if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDateFormat(inpElem) { var dateValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (dateValue == "") { return true; } else { return (zf_DateRegex.test(dateValue)); } } function zf_ValidateCurrency(elem) { var validChars = "0123456789."; var numValue = elem.value.replace(/^\s+|\s+$/g, ''); if (numValue.charAt(0) == '-') { numValue = numValue.substring(1, numValue.length); } if (numValue != null && !numValue == "") { var strChar; var result = true; for (i = 0; i < numValue.length && result == true; i++) { strChar = numValue.charAt(i); if (validChars.indexOf(strChar) == -1) { result = false; } } return result; } else { return true; } } function zf_ValidateDecimalLength(elem, decimalLen) { var numValue = elem.value; if (numValue.indexOf('.') >= 0) { var decimalLength = numValue.substring(numValue.indexOf('.') + 1).length; if (decimalLength > decimalLen) { return false; } else { return true; } } return true; } function zf_ValidateEmailID(elem) { var check = 0; var emailValue = elem.value; if (emailValue != null && !emailValue == "") { var emailArray = emailValue.split(","); for (i = 0; i < emailArray.length; i++) { var emailExp = /^[\w]([\w\-.+&'/]*)@([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,22}$/; if (!emailExp.test(emailArray[i].replace(/^\s+|\s+$/g, ''))) { check = 1; } } if (check == 0) { return true; } else { return false; } } else { return true; } } function zf_ValidateLiveUrl(elem) { var urlValue = elem.value; if (urlValue !== null && typeof(urlValue) !== "undefined") { urlValue = urlValue.replace(/^\s+|\s+$/g, ''); if (urlValue !== "") { var urlregex = new RegExp("^(((https|http|ftps|ftp)://[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*)+(:\\d{1,5})?)|((w|W){3}(\\.[a-zA-Z\\d]+((_|-|@)[a-zA-Z\\d]+)*){2,}(:\\d{1,5})?)|([a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*(\\.[a-zA-Z\\d]+((_|-)[a-zA-Z\\d]+)*)+(:\\d{1,5})?))(/[-\\w.?,:'/\\\\+=&;%$#@()!~]*)?$", "i"); // This regex is taken from LiveFieldsUtil.isValidWebSiteFieldURL() method. Changes: i) Add ^ at the beginning and $ at the end. ii) Remove ?i before https and adjust () around https. iii) Add "i" in the RegExp constructor. // No I18N return (urlregex.test(urlValue)); } } return true; } function zf_ValidatePhone(inpElem) { var ZFPhoneRegex = { PHONE_INTE_ALL_REG: /^[+]{0,1}[()0-9-. ]+$/, PHONE_INTE_NUMERIC_REG: /^[0-9]+$/, PHONE_INTE_CONT_CODE_ENABLED_REG: /^[(0-9-.][()0-9-. ]*$/, PHONE_USA_REG: /^[0-9]+$/, PHONE_CONT_CODE_REG: /^[+][0-9]{1,4}$/ } var phoneFormat = parseInt(inpElem.getAttribute("phoneFormat")); var fieldInpVal = inpElem.value.replace(/^\s+|\s+$/g, ''); var toReturn = true; if (phoneFormat === 1) { if (inpElem.getAttribute("valType") == 'code') { var codeRexp = ZFPhoneRegex.PHONE_CONT_CODE_REG; if (fieldInpVal != "" && !codeRexp.test(fieldInpVal)) { return false; } } else { var IRexp = ZFPhoneRegex.PHONE_INTE_ALL_REG; if (inpElem.getAttribute("phoneFormatType") == '2') { IRexp = ZFPhoneRegex.PHONE_INTE_NUMERIC_REG; } if (fieldInpVal != "" && !IRexp.test(fieldInpVal)) { toReturn = false; return toReturn; } } return toReturn; } else if (phoneFormat === 2) { var InpMaxlength = inpElem.getAttribute("maxlength"); var USARexp = ZFPhoneRegex.PHONE_USA_REG; if (fieldInpVal != "" && USARexp.test(fieldInpVal) && fieldInpVal.length == InpMaxlength) { toReturn = true; } else if (fieldInpVal == "") { toReturn = true; } else { toReturn = false; } return toReturn; } } function zf_ValidateSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValidSign = zf_IsSignaturePresent(objElem, linkName, canvasElem); var hiddenSignInputElem = document.getElementById("hiddenSignInput-" + linkName); if (isValidSign) { hiddenSignInputElem.value = canvasElem.toDataURL(); } else { hiddenSignInputElem.value = ""; // No I18N } return isValidSign; } function zf_MandatoryCheckSignature(objElem) { var linkName = objElem.getAttribute("compname"); var canvasElem = document.getElementById("drawingCanvas-" + linkName); var isValid = zf_IsSignaturePresent(objElem, linkName, canvasElem); return isValid; } function zf_IsSignaturePresent(objElem, linkName, canvasElem) { var context = canvasElem.getContext('2d'); // No I18N var canvasWidth = canvasElem.width; var canvasHeight = canvasElem.height; var canvasData = context.getImageData(0, 0, canvasWidth, canvasHeight); var signLen = canvasData.data.length; var flag = false; for (var index = 0; index < signLen; index++) { if (!canvasData.data[index]) { flag = false; } else if (canvasData.data[index]) { flag = true; break; } } return flag; } function zf_FocusNext(elem, event) { if (event.keyCode == 9 || event.keyCode == 16) { return; } if (event.keyCode >= 37 && event.keyCode <= 40) { return; } var compname = elem.getAttribute("compname"); var inpElemName = elem.getAttribute("name"); if (inpElemName == compname + "_countrycode") { if (elem.value.length == 3) { document.getElementsByName(compname + "_first")[0].focus(); } } else if (inpElemName == compname + "_first") { if (elem.value.length == 3) { document.getElementsByName(compname + "_second")[0].focus(); } } } function zf_ValidateMonthYearFormat(inpElem) { var monthYearValue = inpElem.value.replace(/^\s+|\s+$/g, ''); if (monthYearValue == "") { return true; } else { return (zf_MonthYearRegex.test(monthYearValue)); } }