feat: implement server-side validation for mobile numbers and national codes across multiple endpoints
This commit is contained in:
@@ -59,7 +59,8 @@ Create a new representation.
|
||||
| `ERR_AUTH_001` | 401 | Missing token |
|
||||
| `ERR_AUTH_006` | 403 | Not admin |
|
||||
| `ERR_CONFLICT_001` | 409 | Mobile number already in use |
|
||||
| `ERR_VALIDATION_001` | 422 | Invalid input |
|
||||
| `ERR_VALIDATION_001` | 422 | `mobile_number` فرمت معتبر موبایل ایران (`^09\d{9}$`) ندارد (`field: mobile_number`) |
|
||||
| `ERR_VALIDATION_002` | 422 | `mobile_number` یا `full_name` خالی |
|
||||
|
||||
---
|
||||
|
||||
@@ -288,6 +289,7 @@ Get yearly earnings dashboard for a representation.
|
||||
| Code | HTTP | Description |
|
||||
|------|------|-------------|
|
||||
| `ERR_VALIDATION_002` | 422 | موبایل یا نام خالی |
|
||||
| `ERR_VALIDATION_001` | 422 | `mobile` فرمت معتبر موبایل ایران ندارد (`field: mobile`) |
|
||||
| `ERR_CONFLICT_001` | 409 | این کاربر قبلاً پزشک است |
|
||||
|
||||
---
|
||||
@@ -314,6 +316,7 @@ Get yearly earnings dashboard for a representation.
|
||||
| Code | HTTP | Description |
|
||||
|------|------|-------------|
|
||||
| `ERR_VALIDATION_002` | 422 | موبایل یا نام خالی |
|
||||
| `ERR_VALIDATION_001` | 422 | `owner_mobile` فرمت معتبر موبایل ایران ندارد (`field: owner_mobile`) |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user