mares-validation-error

1.0.1 • Public • Published

mares-validation-error

mares error object를 정규화 해주는 에러 클래스입니다.

Installation

npm install --save mares-validation-error

Example

const MaresValidationError = require('mares-validation-error')

let error = new MaresValidationError(400, {
	code: 'error code'
})

// multi 에러인 경우 해당 함수를 이용해서 에러를 추가할 수 있습니다.
error.addError({
    code: 'code',
    param: 'dataparam',
    value: '1',
    domain: null
})

throw error

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i mares-validation-error

      Weekly Downloads

      3

      Version

      1.0.1

      License

      ISC

      Unpacked Size

      3.41 kB

      Total Files

      3

      Last publish

      Collaborators

      • hwaranglee
      • sngsng
      • piorio0919
      • kspark