kwalify 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,41 +0,0 @@
1
- ###
2
- ### $Rev: 8 $
3
- ### $Release: 0.1.0 $
4
- ### copyright(c) 2005 kuwata-lab all rights reserved.
5
- ###
6
-
7
- module Kwalify
8
-
9
- ERROR_MESSAGES = {}
10
-
11
- ## validation error
12
- ERROR_MESSAGES[:missing_value] = "value required but not found."
13
- ERROR_MESSAGES[:invalid_type] = "%s type expected but got %s."
14
- ERROR_MESSAGES[:invalid_enum] = "'%s' is invalid enum value."
15
- ERROR_MESSAGES[:invalid_pattern] = "'%s' is not matched to pattern %s."
16
- ERROR_MESSAGES[:missing_key] = "key '%s' required but not found."
17
- ERROR_MESSAGES[:invalid_key] = "key '%s' is not expected."
18
-
19
- ## ruleset error
20
- ERROR_MESSAGES[:ruleset_not_hash] = "ruleset is not a hash."
21
- ERROR_MESSAGES[:type_not_found] = "type '%s' is not found."
22
- ERROR_MESSAGES[:required_not_boolean] = "'required:' is not 'true' nor 'false'."
23
- ERROR_MESSAGES[:regexp_error] = "'pattern:' has regexp error (= %s)."
24
- ERROR_MESSAGES[:enum_not_seq] = "'enum:' is not a sequence."
25
- ERROR_MESSAGES[:sequence_not_seq] = "'sequence:' should be a sequence."
26
- ERROR_MESSAGES[:sequence_no_elem] = "'sequence:' requires one element."
27
- ERROR_MESSAGES[:sequence_too_many] = "'sequence:' requires just one element."
28
- ERROR_MESSAGES[:mapping_not_map] = "'mapping:' should be a mapping."
29
- ERROR_MESSAGES[:mapping_no_elem] = "'mapping:' requires at least one element."
30
- ERROR_MESSAGES[:duplicate_key] = "key '%s' is duplicated."
31
- ERROR_MESSAGES[:unexpected_key] = "'%s' is not expected."
32
- ERROR_MESSAGES[:seq_has_enum] = "'enum:' is not available with sequence type."
33
- ERROR_MESSAGES[:seq_has_pattern] = "'pattern:' is not available with sequence type."
34
- ERROR_MESSAGES[:seq_has_mapping] = "'mapping:' is not available with sequence type."
35
- ERROR_MESSAGES[:map_has_enum] = "'enum:' is not available with mapping type."
36
- ERROR_MESSAGES[:map_has_pattern] = "'pattern:' is not available with mapping type."
37
- ERROR_MESSAGES[:map_has_sequence] = "'sequence:' is not available with mapping type."
38
- ERROR_MESSAGES[:scalar_has_sequence] = "scalar cannot take 'sequence:'."
39
- ERROR_MESSAGES[:scalar_has_mapping] = "scalar cannot take 'mapping:'."
40
-
41
- end