Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Commit a39c1ff

Browse files
Alterando o nome da função de validação
1 parent 7e56018 commit a39c1ff

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ try {
8989
},
9090
};
9191

92-
const errors = schema.init(params, scope);
92+
const errors = schema.isValid(params, scope);
9393

9494
} catch (err) {
9595
if (err instanceof InvalidParam) {

lib/Scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Scope {
77
this.setConfig(config);
88
this.errors = [];
99
}
10-
init(params, schema) {
10+
isValid(params, schema) {
1111
const response = this.validate(params, schema, null);
1212
if (response)
1313
throw new InvalidParam_1.default(response);

src/Scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class Scope {
1212
this.errors = [];
1313
}
1414

15-
public init(params: any, schema: any) {
15+
public isValid(params: any, schema: any) {
1616
const response = this.validate(params, schema, null);
1717
if (response)
1818
throw new InvalidParam(response);

0 commit comments

Comments
 (0)