2023-12-31 14:24:05 +00:00
|
|
|
---
|
|
|
|
title: Input Validation
|
|
|
|
---
|
2022-07-11 15:09:18 +00:00
|
|
|
|
|
|
|
## Admin Username
|
|
|
|
|
|
|
|
Usernames for an administrator in spotweb have some restrictions.
|
|
|
|
|
2022-07-22 18:23:01 +00:00
|
|
|
- Following words are not allowed:
|
|
|
|
- god
|
|
|
|
- mod
|
|
|
|
- spot
|
|
|
|
- admin
|
|
|
|
- drazix
|
|
|
|
- superuser
|
|
|
|
- supervisor
|
|
|
|
- root
|
|
|
|
- anonymous
|
|
|
|
- Following characters are not allowed:
|
2023-11-08 16:43:36 +00:00
|
|
|
- `<`
|
|
|
|
- `\>`
|
2022-07-22 18:23:01 +00:00
|
|
|
- Regex used to validate the username (you can try live [here](https://regex101.com/r/LA4Io7/1)):
|
|
|
|
`^((?!god|mod|spot|admin|drazix|superuser|supervisor|root|anonymous)[^<>])*$`
|
2022-07-11 15:09:18 +00:00
|
|
|
|
|
|
|
## Admin Firstname and Lastname
|
|
|
|
|
2022-07-22 18:23:01 +00:00
|
|
|
The firstname and lastname in spotweb have some restrictions.
|
2022-07-11 15:09:18 +00:00
|
|
|
|
2022-07-22 18:23:01 +00:00
|
|
|
- Following characters are not allowed:
|
2023-11-08 16:43:36 +00:00
|
|
|
- `<`
|
|
|
|
- `\>`
|
2022-07-22 18:23:01 +00:00
|
|
|
- Minimum lenght of 2 characters is enforced
|
|
|
|
- Regex used to validate the firstname and lastname (you can try live [here](https://regex101.com/r/x2KGnU/1)):
|
|
|
|
`^([^<>]{2})([^<>]*)$`
|
2022-07-11 15:09:18 +00:00
|
|
|
|
|
|
|
## Admin Email
|
|
|
|
|
|
|
|
The email addres is validated in spotweb using the built-in `_FILTER_VALIDATE_EMAIL`.
|
|
|
|
|
2022-07-22 18:23:01 +00:00
|
|
|
- Regex used to validate the email (you can try live [here](https://regex101.com/r/yEmCoL/1)):
|
2023-12-31 20:39:31 +00:00
|
|
|
|
|
|
|
```regex
|
|
|
|
^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$
|
|
|
|
```
|
2022-07-11 15:09:18 +00:00
|
|
|
|
|
|
|
---
|
2022-07-22 18:23:01 +00:00
|
|
|
|
2022-07-11 15:09:18 +00:00
|
|
|
If you find a field that you think it needs validation, please open an issue on github
|