Best way to validate if there is input in a text field

I’m trying to validate if there is an email address already populated in a text field or if there is not an email address there, then I’ll have to put it in.

What’s the most efficient way to do this?

You can use ‘Get Attribute’ activity. Look for ‘text’ attribute to get the data from within the textbox.

Thanks,
Rammohan B.

So far I have get text, then I use an if statement to see if string.Contains(“@domain.com”)
Is there a better way than that? Is there a way that I can just check if there is or is not text in the field?

If I do a get text activity… And there is nothing in there, What does it return? Is it “” just like an empty string?
So in my if statement would it be correct to say,

if (email IS nothing)
Then
put the email in…

Is an empty string the same thing as nothing in vb.net?

String.IsNullOrEmpty(yourvalue)

1 Like