1
I work with C# - WPF and have a field where the client can enter his full name. I’d like to validate where it can’t just type the first name if it doesn’t open a blocking message. I mean, he would need to type at least two names.
I tried to do it this way, but he only takes the spaces that come before the first name
bool espaco= txtBox1.Text.Length>0 && txtBox1.Text.Trim().Length==0;
if (espaco){
MessageBox.Show("Erro");
}
You can understand, otherwise I try to explain better... Help me
Perfect explanation friend, and it worked perfectly... Thank you xDD
– Emerson Moraes