First two letters must be in alphabet in Text property.

Hi Team, here i have a requirement that:

In An Vehicle selling application, where must be a field for “VehicleRegistrationNumber”, that format should be

like (AA21BB2023). here i need to get first two values must be in alphabetic.

To Achieve this requirement what should we do?

Thanks in advance.

@PraveenkumarR3390

You should create an Edit validate rule that fits your requirements. You can use something like this:

for (int pos = 0, len = 2; pos < len; ++pos) {
	if (! Character.isLetterOrDigit(theValue.charAt(pos)))
         {
		return false;
	}
}
return true;

Then you have to add your newly created Edit Validate rule to the property VehicleRegistrationNumber in Advance tab > Use validate.

@PraveenkumarR3390

Create a new function similar to the existing function isAlphaNumeric by removing the code related to numbers and use it.

@mohaa14 Thanks for your valuable reply. ​​​​​​​

@DorianeLovesPega Thanks for your valuable reply

@PraveenkumarR3390 please could you mark the ‘Accept Solution’ button against the reply which helped solve your question?

This will help our other forum users looking into similar future scenarios.

@MarijeSchillern Thank you for take attention