<?xml version="1.0" encoding="utf-8"?>

Validate payment details

Validate payment details Bad Practice
Validate payment details Best Practice

Users are humans, and they make mistakes, especially when entering payment details on mobile and using one hand. It's vital to consider adding validation before users submit their payment details. Users mistype numbers, or the card may have expired — so make sure to address these numerous error states.

To make users' lives a bit easier, consider adding input masks i.e., constraints on the input text. Masks help ensure that numbers or strings meet the expected format, prevent any unnecessary errors, and reduce friction prior to system validation.

Improve your UX & Product skills with interactive courses that actually work