Unbounce lets you build custom landing pages, often for lead generation. Data Soap validates the phone numbers and email addresses entered into your Unbounce forms live, as visitors type.
First, create a Public API token from your Data Soap account under Profile → API Authentication, with the domain of your landing page set as the token's origin.
<script type="text/javascript">// Global configvar dsConfig = {token: "Insert Token Here",connectionErrorsPassValidations: false,highlightSuccess: true, // valid emails/numbers get a green borderallowTemporaryErrors: false, // risky in rare cases, but avoids blocking on a temporary network issueemail: {enabled: true,msg: "Email address is invalid",allowDisposable: false,},mobile: {enabled: true,msg: "Phone number is invalid",},landline: { // UK onlyenabled: true,msg: "Phone number is invalid",},};// Validates each field on change, using dsConfig above, and calls the Data Soap// API directly from the browser with your public token.</script>
This styles the field border to match a valid or invalid result.
<style>.dsError {border-color: rgba(232, 65, 24, 1) !important;background: rgba(232, 65, 24, 0.15) !important;color: rgb(232, 65, 24) !important;}.dsSuccess {border-color: rgba(68, 189, 50, 1) !important;}</style>
Click Done - your integration is now live.
Fields are validated against https://api.datasoap.co.uk using your token, with results styled via the .dsError / .dsSuccess classes above.