def validate_static_routes(value):
    """
    sca1, sca+sca, http://localhost:8002+http://localhost:8002;
    sca2, sca+sca, http://localhost:8003+http://localhost:8003;

    must convert in:

    ((
        'sca1',
        ('sca','sca'),
        ('http://localhost:8002', 'http://localhost:8002'),
    ),
    (
        'sca2',
        ('sca','sca'),
        ('http://localhost:8003', 'http://localhost:8003'),
    ))

    """
    routes = []
    if value:
        value = value.split(';')
        for r in value:
            r = r.strip()
            if r:
                routes.append(r)
        for idx, r in enumerate(routes):
            items = r.split(',')
            v = []
            for it in items:
                it = it.strip()
                if it:
                    v.append(it)
            routes[idx] = v
        for r in routes:
            for idx, field in enumerate(r):
                v = ()
                if not '+' in field:
                    v += field,
                    continue
                items = field.split('+')
                for e in items:
                    e = e.strip()
                    if e:
                        v += e,
                r[idx] = v
    return routes
