Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  if (this.state.firstname === '') {
  2.             alert('Podaj Imię');
  3.             return;
  4.         }
  5.         if (this.state.lastname === '') {
  6.             alert('Podaj Nazwisko');
  7.             return;
  8.         }
  9.         if (this.state.email === '') {
  10.             alert('Podaj Email');
  11.             return;
  12.         }
  13.         if (this.state.password === '') {
  14.             alert('Podaj Hasło');
  15.             return;
  16.         }
  17.         if (this.state.repeatpassword === '') {
  18.             alert('Powtórz Hasło');
  19.             return;
  20.         }
  21.         if (!this.state.password === this.state.repeatpassword) {
  22.             alert('Hasła muszą być takie same');
  23.         }
  24.         let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
  25.         if (reg.test(this.state.email) === false) {
  26.             alert('Email jest niepoprawny.');
  27.             return;
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement