Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void bunifuFlatButton2_Click(object sender, EventArgs e)
- {
- string username = textBox1.Text;
- bool IsRealUser = Regex.IsMatch(username, @"A(?:[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)Z");
- string password = textBox2.Text;
- bool IsRealPass = Regex.IsMatch(password, @"^(?=.*[a-z])(?=.*[A-Z])(?=.*d).{8,15}$");
- string email = textBox4.Text;
- bool IsRealEmail = Regex.IsMatch(email, @"^([0-9a-zA-Z]([-.w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+[a-zA-Z]{2,9})$");
- if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "")
- {
- System.Windows.Forms.MessageBox.Show("Fill out the required forms!");
- return;
- }
- else if (textBox2.Text != textBox3.Text)
- {
- System.Windows.Forms.MessageBox.Show("Your passwords are not matching");
- }
- else if (IsRealPass || IsRealUser || IsRealEmail)
- {
- //
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement