Validate GPS value.

def validate_gps(value):
    """Validate GPS value."""
    try:
        latitude, longitude, altitude = value.split(',')
        vol.Coerce(float)(latitude)
        vol.Coerce(float)(longitude)
        vol.Coerce(float)(altitude)
    except (TypeError, ValueError, vol.Invalid):
        raise vol.Invalid(
            'GPS value should be of format "latitude,longitude,altitude"')
    return value