| 1 | package JMAP::Validation; | ||
| 2 | # ABSTRACT: Validation checking for JMAP | ||
| 3 | |||
| 4 | use Test2::Bundle::Extended; | ||
| 5 | |||
| 6 | use Test2::Compare qw{ | ||
| 7 | compare | ||
| 8 | strict_convert | ||
| 9 | }; | ||
| 10 | |||
| 11 | sub validate { | ||
| 12 | my ($got, $expected) = @_; | ||
| 13 | |||
| 14 | return !compare($got, $expected, \&strict_convert); | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; |