Package org.confng.validation
Annotation Type Required
-
@Documented @Retention(RUNTIME) @Target(FIELD) public @interface Required
Marks a configuration key as required.When applied to a ConfNGKey enum constant, validation will fail if the configuration value is not set and has no default value.
Example usage:
{@code public enum MyConfig implements ConfNGKey {- Since:
- 1.1.0
- Author:
- Bharat Kumar Malviya, GitHub: github.com/imBharatMalviya
- See Also:
ConfigValidator
-
-
Element Detail
-
message
String message
Custom error message to use when validation fails. If empty, a default message will be generated.- Returns:
- the custom error message
- Default:
- ""
-
-