Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if( $this->request['age'] < 15 || $this->request['age'] > 90 )
- {
- $errors[] = 'Персонаж должен быть старше 15 лет младше 90.';
- }
- if( ! $this->validateSkin( $this->request['skin'], $this->request['sex'] ) )
- {
- $errors[] = 'Этот скин не существует в нашей базе данных';
- }
- if( strlen( $this->request['name'] . $this->request['lastname'] . 1 ) > 22 )
- {
- $errors[] = 'Имя и фамилия должно быть короче 22 знаков.';
- }
- if( $this->request['weight'] < 50 || $this->request['weight'] > 150 )
- {
- $errors[] = 'Вес должен быть в пределе 50-150.';
- }
- if( $this->request['height'] < 140 || $this->request['height'] > 210 )
- {
- $errors[] = 'Рост должен быть в пределе 140-210.';
- }
- if( strlen( $this->request['name'] ) < 2 )
- {
- $errors[] = 'Имя должно состоять минимум из двух знаков.';
- }
- if( strlen( $this->request['lastname'] ) < 3 )
- {
- $errors[] = 'Фамилия должна состоять минимум из трёх знаков.';
- }
- if( ! preg_match( '/^([A-Za-zäÄöÖüÜß])*$/', $this->request['name'] . $this->request['lastname'] ) )
- {
- $errors[] = 'В имени и фамилии недопустимые символы';
- }
- if( strlen( $this->request['description'] ) < 150 || strlen( $this->request['description'] ) > 550 )
- {
- $errors[] = 'Описание должно содержать 150 - 500 символов.';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement