Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoonapps/kr-validators-test
kr-validators test app
https://github.com/hoonapps/kr-validators-test
class-validator nestjs testing
Last synced: 6 days ago
JSON representation
kr-validators test app
- Host: GitHub
- URL: https://github.com/hoonapps/kr-validators-test
- Owner: hoonapps
- License: mit
- Created: 2024-11-25T13:38:38.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T13:42:36.000Z (2 months ago)
- Last Synced: 2024-11-25T14:39:28.875Z (2 months ago)
- Topics: class-validator, nestjs, testing
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/kr-validators
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
## Description
[kr-validators](https://github.com/hoonapps/kr-validators) test app.
## Project setup
```bash
$ npm install
```## Compile and run the project
```bash
# development
$ npm run start```
#### URL:
```bash
http://localhost:3000/users
```#### HTTP Method:
`POST`
#### Headers:
```bash
Content-Type: application/json
```#### Body (JSON format):
##### Valid Data:
```json
{
"email": "[email protected]",
"phone": "010-1234-5678",
"residentId": "9201011234567",
"businessNumber": "1234567890",
"postalCode": "06236"
}
```##### Invalid Data:
```json
{
"email": "not-an-email",
"phone": "123",
"residentId": "123456",
"businessNumber": "12345",
"postalCode": "123"
}
```## Expected Results
### Valid Data
#### Response:
```json
{
"message": "User created successfully",
"data": {
"email": "[email protected]",
"phone": "010-1234-5678",
"residentId": "9201011234567",
"businessNumber": "1234567890",
"postalCode": "06236"
}
}
```### Invalid Data
#### Response:
```json
{
"statusCode": 400,
"message": [
"유효한 이메일 주소를 입력해주세요.",
"유효하지 않은 전화번호입니다.",
"유효하지 않은 주민등록번호입니다.",
"유효하지 않은 사업자등록번호입니다.",
"유효하지 않은 우편번호입니다."
],
"error": "Bad Request"
}
```---
## License
This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) file for details.
---
## Author
Created by **hoonapps**.
Visit the [GitHub Repository](https://github.com/hoonapps) for more projects.---
### Need help?
Feel free to reach out at **[email protected]** or create an issue in the repository!