Function validateStrokeStyle