Home Pan Format
Post
Cancel

Pan Format

Edit Validate rules

Format

  • Ex: AFZPK7190K
1
2
3
4
5
6
7
8
9
10
11
12
13
// Regex to check valid Pan card number 
String regex= ("[A-Z]{5}[0-9]{4}[A-Z]{1}");

// Compile the ReGex
  java.util.regex.Pattern p=java.util.regex.Pattern.compile(regex);

// If the string is empty, return false
if (theValue == null || theValue.trim().equals("")) return false;
theProperty.addMessage("Please enter valid Pan Number");

// Pattern class contains matches() method to match the given string and regular expression
java.util.regex.Matcher m = p.matcher(theValue);
return m.matches();

Reference

Click Here - More details from pega academy for Edit Validate rules

This post is licensed under CC BY 4.0 by the author.

IFSC Code Format

Debit Card Exp Date Format

Comments powered by Disqus.