Skip to content

Commit 011f132

Browse files
committed
hotfix
1 parent 32acaa5 commit 011f132

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

lib/src/exceptions/validation_err.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class LValidationException extends LaravelException {
55

66
LValidationException(
77
Map<String, dynamic> response,
8-
) : _errors = response['error']['errors'] ?? response['error'],
8+
) : _errors = response['errors'] ?? response['error'],
99
super(
1010
response: response,
1111
);

test/laravel_validation_test.dart

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@ import 'package:test/test.dart';
33

44
void main() {
55
const resData = <String, dynamic>{
6-
"error": {
7-
'message': "The given data was invalid.",
8-
'errors': {
9-
'website': [
10-
'The website format is invalid.',
11-
],
12-
'calling_code': [
13-
'The calling code may not be greater than 4 characters.',
14-
],
15-
'mobile': [
16-
'The mobile may not be greater than 9 characters.',
17-
],
18-
}
6+
'errors': {
7+
'website': [
8+
'The website format is invalid.',
9+
],
10+
'calling_code': [
11+
'The calling code may not be greater than 4 characters.',
12+
],
13+
'mobile': [
14+
'The mobile may not be greater than 9 characters.',
15+
],
1916
},
2017
};
2118
// const resData = <String, dynamic>{

0 commit comments

Comments
 (0)