private static void validateChannelName ( final String name, final ValidationContext ctx )
    {
        if ( name == null || name.isEmpty () )
        {
            return;
        }

        final Matcher m = ChannelService.NAME_PATTERN.matcher ( name );
        if ( !m.matches () )
        {
            ctx.error ( "names", String.format ( "The channel name '%s' must match the pattern '%s'", name, ChannelService.NAME_PATTERN.pattern () ) );
        }
    }
private static void validateChannelName ( final String name, final ValidationContext ctx )
    {
        if ( name == null || name.isEmpty () )
        {
            return;
        }

        final Matcher m = ChannelService.NAME_PATTERN.matcher ( name );
        if ( !m.matches () )
        {
            ctx.error ( "names", String.format ( "The channel name '%s' must match the pattern '%s'", name, ChannelService.NAME_PATTERN.pattern () ) );
        }
    }
private static void validateChannelName ( final String name , final ValidationContext ctx ) { if ( name == null || name . isEmpty ( ) ) { return ; } final Matcher m = ChannelService . NAME_PATTERN . matcher ( name ) ; if ( ! m . matches ( ) ) { ctx . error ( "names" , String . format ( "The channel name '%s' must match the pattern '%s'" , name , ChannelService . NAME_PATTERN . pattern ( ) ) ) ; } }
Validate the name of the channel

@param name
the channel name to test
@param ctx
the validation context
Validate the name of the channel