Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


Nest Logo

[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.



NPM Version
Package License
NPM Downloads
CircleCI
Coverage
Discord
Backers on Open Collective
Sponsors on Open Collective
Donate us
Support us
Follow us on Twitter


## 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!