Hi All,
I am working on a process which involves typing data into a web application which should not allow alphabets, and should allow number which have only 10 digits.
Can anyone suggest on how to get both the conditions applied ?
Hi All,
I am working on a process which involves typing data into a web application which should not allow alphabets, and should allow number which have only 10 digits.
Can anyone suggest on how to get both the conditions applied ?
If I enter alphabets it should not allow and it should allow digits more dan 10.These are the two conditions
Hi @Abc_Xyz1 ,
Could you maybe clarify these points ? Do you want to allow only 10 Digits or 10 or more digits ?
Only 10 and no alphabets
Try with the below in If
Condition :
YourStringVar.IsNumeric andAlso YourStringVar.Length = 10
@Abc_Xyz1
Hello, easiest way is combining what others have said in a Flow Chart with the Flow Decision:
YourInput.IsNumeric And YourInput.Length = 10
Regards
string input = InputDialog(“Enter a 10 digit number”)
Match match = Regex.Match(input, pattern)
if(match.Success)
{
//input is valid
//process can continue
}
else
{
//input is not valid
//process can be stopped or a message displayed to the user
}
This is a simple example, you can also use other regex validation to match the desired input format.