I am trying to use Google's libphonenumber library in my project. I am trying to validate a phone number input using the javascript version, but it is giving me a "goog is not defined" error. I am very new to javascript andI have already spent a day searching for an answer and couldn't find one. The error is in the phonenumberutil.js on the very first line where it says
goog.provide('i18n.phonenumbers.Error');
This library needs the closure library and I have added it as
<!-- Scripts for google phone number validation utils -->
<tags:script source="/js/GooglePhoneNumberUtils/phonenumberutil.js"/>
<script src="http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js"></script>
<script>
goog.require('goog.dom');
goog.require('goog.json');
goog.require('goog.proto2.ObjectSerializer');
goog.require('goog.string.StringBuffer');
</script>
I have no idea whats going on so please any help will be useful.