wffweb/src/main/java/com/webfirmframework/wffweb/css/BorderTop.java
public static boolean isValid(final String cssValue) {
        // TODO modify to make a strict validation
        if (cssValue == null || StringUtil.isBlank(cssValue)) {
            return false;
        }

        final List<String> cssValueParts = CssValueUtil.split(cssValue);

        BorderTopWidth borderTopWidth = null;
        BorderTopStyle borderTopStyle = null;
        BorderTopColor borderTopColor = null;

        for (final String eachPart : cssValueParts) {

            boolean invalid = true;
            if (borderTopWidth == null && BorderTopWidth.isValid(eachPart)) {
                borderTopWidth = new BorderTopWidth(eachPart);
                invalid = false;
            } else if (borderTopStyle == null
                    && BorderTopStyle.isValid(eachPart)) {
                borderTopStyle = BorderTopStyle.getThis(eachPart);
                invalid = false;
            } else if (borderTopColor == null
                    && BorderTopColor.isValid(eachPart)) {
                borderTopColor = new BorderTopColor(eachPart);
                invalid = false;
            }
            if (invalid) {
                return false;
            }
        }

        return borderTopWidth != null || borderTopStyle != null
                || borderTopColor != null;
    }
public static boolean isValid(final String cssValue) {
        // TODO modify to make a strict validation
        if (cssValue == null || StringUtil.isBlank(cssValue)) {
            return false;
        }

        final List<String> cssValueParts = CssValueUtil.split(cssValue);

        BorderTopWidth borderTopWidth = null;
        BorderTopStyle borderTopStyle = null;
        BorderTopColor borderTopColor = null;

        for (final String eachPart : cssValueParts) {

            boolean invalid = true;
            if (borderTopWidth == null && BorderTopWidth.isValid(eachPart)) {
                borderTopWidth = new BorderTopWidth(eachPart);
                invalid = false;
            } else if (borderTopStyle == null
                    && BorderTopStyle.isValid(eachPart)) {
                borderTopStyle = BorderTopStyle.getThis(eachPart);
                invalid = false;
            } else if (borderTopColor == null
                    && BorderTopColor.isValid(eachPart)) {
                borderTopColor = new BorderTopColor(eachPart);
                invalid = false;
            }
            if (invalid) {
                return false;
            }
        }

        return borderTopWidth != null || borderTopStyle != null
                || borderTopColor != null;
    }
public static boolean isValid ( final String cssValue ) { // TODO modify to make a strict validation if ( cssValue == null || StringUtil . isBlank ( cssValue ) ) { return false ; } final List < String > cssValueParts = CssValueUtil . split ( cssValue ) ; BorderTopWidth borderTopWidth = null ; BorderTopStyle borderTopStyle = null ; BorderTopColor borderTopColor = null ; for ( final String eachPart : cssValueParts ) { boolean invalid = true ; if ( borderTopWidth == null && BorderTopWidth . isValid ( eachPart ) ) { borderTopWidth = new BorderTopWidth ( eachPart ) ; invalid = false ; } else if ( borderTopStyle == null && BorderTopStyle . isValid ( eachPart ) ) { borderTopStyle = BorderTopStyle . getThis ( eachPart ) ; invalid = false ; } else if ( borderTopColor == null && BorderTopColor . isValid ( eachPart ) ) { borderTopColor = new BorderTopColor ( eachPart ) ; invalid = false ; } if ( invalid ) { return false ; } } return borderTopWidth != null || borderTopStyle != null || borderTopColor != null ; }
checks the given css value is valid for this class. It does't do a strict
validation.

@param cssValue
@return
@since 1.0.0
@author WFF
checks the given css value is valid for this class . It does t do a strict validation .