Build the future of communications.
Start Building for Free

validation posts

  • By Matthew Setter
    Build a Phone Number Validator with Laravel Build a Phone Number Validator with Laravel

    Data validation is essential to any application, regardless of its size and purpose. Without it, you risk using data that's forged by malicious actors, contains only junk—or is a combination of both. And it doesn't matter where the data comes from either; whether from a web form, retrieved from a database, or read from an environment setting.

    Gladly, validation is extremely common in modern software development, so much so that there are numerous third-party packages available on Packagist, and PHP's major frameworks all have a validation component. With them, you can validate email addresses, passwords, dates, IP addresses, numbers and so much more!

    However, what happens when the package or framework doesn't support your use case, such as validating a phone number? In that case, you roll your own!

    In this tutorial, we're going to build a custom Laravel validation rule object that validates a phone number from any country …

    Read More
  • By Anibal Sanchez
    How to Validate a Phone Number in a Joomla Extension validate-phone-numbers.png

    In the article Add a Click To Call Button & SMS Chat to Your Joomla Site, I presented a ready-to-use extension, XT Twilio for Joomla to implement a simple communication channel on a website. The basic extension sends SMS messages (or supports a Click2Call workflow) between users and the sales area. In the second article of this series, How to Customize a Joomla Extension for SMS Chat, I presented a case to add the client name field to the extension and personalize the SMS messaging.

    In this tutorial, to tackle the complexity of handling international telephone numbers properly following the E.164 standard, I’m going to introduce the integration of an advanced JavaScript plugin for entering and validating international telephone numbers, jackocnr/intl-tel-input. The plugin adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods. For a complete …

    Read More
  • By Phil Nash
    Validate Ruby objects with Active Model Validations

    In the world of Rails and Active Record, validating data and storing it in a database is easy. If you’d ever built a simple site that stores data in a Google Spreadsheet then you’d quickly learn that users can enter anything (or nothing). In this post we’ll see how to validate input using part of Active Record: ActiveModel::Validations.

    Spreadsheets can be databases too

    In my last post we built a landing page for a new app using Sinatra and Google Spreadsheets as the database. The app needs one improvement though; users can enter any data they want in the form and it will happily submit. We need to guarantee we get some real data if we are going to contact our users when the app launches.

    We should validate our input and ensure that

    • We get at least a name and email address
    • If we get an email …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.