All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.parsec.constraint.validators.Msisdn Maven / Gradle / Ivy

There is a newer version: 1.0.24
Show newest version
// Copyright 2016 Yahoo Inc.
// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.

package com.yahoo.parsec.constraint.validators;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * The javax.validation Msisdn annotation.
 */
@Target({ FIELD, METHOD, ANNOTATION_TYPE })
@Retention(RUNTIME)
@Constraint(validatedBy = MsisdnValidator.class)
public @interface Msisdn {

    /**
     * the default error message.
     *
     * @return the default error message
     */
    String message() default "invalid Msisdn";

    /**
     * the class groups to apply for validation.
     *
     * @return array of validation groups
     */
    Class[] groups() default {
    };

    /**
     * the annotation payload.
     *
     * @return array of Payload classes
     */
    Class[] payload() default {
    };
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy