Validation to check UserID with Period/Dot seperated
Regular Expression Rules:
Finite automata rule, Values should precede with characters of set [A-Za-z] and followed with period(.) and character set [A-Za-z] Regular Expression:
^[a-zA-Z]+(\.[a-zA-Z]+)+$ Matches
1) Ratan.Tata
2) Anil.Dhiru.Ambhani
Non-Matches
Ratan.
1) .Mukesh.
2) Amir.khan. Regular Expression Logic in Javasctipt
function CheckForPeriodSeperatedUserID( fieldValue )
{
var regex = /^[a-zA-Z]+(\.[a-zA-Z]+)+$/;
if( !fieldValue.match( regex ) )
{
alert('The UserID is not desired format,XXX.YYYY XXX.YYYY.ZZZZ');
return false;
}
return true;
}