Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (this.state.firstname === '') {
- alert('Podaj Imię');
- return;
- }
- if (this.state.lastname === '') {
- alert('Podaj Nazwisko');
- return;
- }
- if (this.state.email === '') {
- alert('Podaj Email');
- return;
- }
- if (this.state.password === '') {
- alert('Podaj Hasło');
- return;
- }
- if (this.state.repeatpassword === '') {
- alert('Powtórz Hasło');
- return;
- }
- if (!this.state.password === this.state.repeatpassword) {
- alert('Hasła muszą być takie same');
- }
- let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
- if (reg.test(this.state.email) === false) {
- alert('Email jest niepoprawny.');
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement