@ Nonnull public static EValidity validateMessage ( @ Nullable final String sMsg ) { final int nLen = StringHelper . getLength ( sMsg ) ; if ( nLen >= 7 && nLen <= 8 ) if ( AbstractUPCEAN . validateMessage ( sMsg ) . isValid ( ) ) return EValidity . VALID ; return EValidity . INVALID ; }
Validates a EAN - 8 message . The method throws IllegalArgumentExceptions if an invalid message is passed .