title: How to Validate TextEdit to accept Website address,Phone,Email formats only in WPF from .cs file?
body: <p>I have a TextEdit on form. which contains website address Text Field, Phone(US), email. I want to validate all these from .cs file. Please any one can help me?</p>
  
  <p>WPF Markup:</p>
  
  <pre><code>&lt;dxe:TextEdit x:Name="txtEmpFacebook" TabIndex="25" MaxLength="30" HorizontalAlignment="Left" Margin="606,0,0,3" VerticalAlignment="Bottom" Width="88" LostFocus="txtEmpFacebook_LostFocus"/&gt;
  
  &lt;Label x:Name="lblEmpFacebookError" Content="*" Foreground="Red" HorizontalAlignment="Left" Margin="985,94,0,0" VerticalAlignment="Top" RenderTransformOrigin="13.467,-0.231" Grid.Row="1"/&gt;
  
  protected bool ValidateAllContactDetails()
          {
              bool isfocused = false;
              bool isValid = true;
              //Validate Contact First Name
              if (string.IsNullOrEmpty(txtEmpFirstName.Text))
              {
                  isValid = false;
                  lblEmpFirstNameError.Visibility = Visibility.Visible;
                  if (!isfocused)
                  {
                      isfocused = true;
                      txtEmpFirstName.Focus();
  
                  }
              }
              else
              {
                  lblEmpFirstNameError.Visibility = Visibility.Hidden;
              }
  }
  </code></pre>
  
  <p>This works fine for Empty Text and displays Error. but now want to Validate the Website URL Format,Phone (US) format, Email Format in existing code. 
  Any one can help me?
  Help Appreciated!</p>