Repository: frictionlessdata/framework
Issue: Using 'bareNumber: false' on 'number' or 'integer' field strips minus sign for negative values

# Overview

Using `bareNumber: false` on a field with type `number` or `integer` strips the minus sign for negative values.

```python
>>> from frictionless import Field

>>> field = Field.from_descriptor({"name": "foo", "type": "number", "bareNumber": True})

>>> field.read_cell("-12.3")[0]
Decimal('-12.3')

>>> field = Field.from_descriptor({"name": "foo", "type": "number", "bareNumber": False})

>>> field.read_cell("12.3 €")[0]
Decimal('12.3')

>>> field.read_cell("-12.3 €")[0]
Decimal('12.3')
```

Same for `integer` :

```python
>>> field = Field.from_descriptor({"name": "foo", "type": "integer", "bareNumber": True})

>>> field.read_cell("-12")[0]
-12

>>> field = Field.from_descriptor({"name": "foo", "type": "integer", "bareNumber": False})

>>> field.read_cell("12 €")[0]
12

>>> field.read_cell("-12 €")[0]
12
```

Changed files:
frictionless/schema/field.py, frictionless/fields/integer.py, tests/fields/test_integer.py, tests/schema/field/test_read.py, tests/fields/test_number.py, frictionless/fields/number.py

diff --git a/frictionless/fields/integer.py b/frictionless/fields/integer.py
index 362bc3e8..8d675498 100644
--- a/frictionless/fields/integer.py
+++ b/frictionless/fields/integer.py
@@ -31,7 +31,7 @@ class IntegerField(Field):
         # Create pattern
         pattern = None
         if not self.bare_number:
-            pattern = re.compile(r"((^\\D*)|(\\D*$))")
+            pattern = re.compile(r"((^[^-\\d]*)|(\\D*$))")
 
         # Create reader
         def value_reader(cell: Any):
diff --git a/frictionless/fields/number.py b/frictionless/fields/number.py
index 4fd0820d..de23c9f5 100644
--- a/frictionless/fields/number.py
+++ b/frictionless/fields/number.py
@@ -47,7 +47,7 @@ class NumberField(Field):
         # Create pattern
         pattern = None
         if not self.bare_number:
-            pattern = re.compile(r"((^\\D*)|(\\D*$))")
+            pattern = re.compile(r"((^[^-\\d]*)|(\\D*$))")
 
         # Create processor
         processor = None
diff --git a/frictionless/schema/field.py b/frictionless/schema/field.py
index 561c0d37..0da8ed3a 100644
--- a/frictionless/schema/field.py
+++ b/frictionless/schema/field.py
@@ -130,7 +130,7 @@ class Field(Metadata):
         # Create reader
         def cell_reader(cell: Any):
             notes: Optional[Dict[str, str]] = None
-            if cell in missing_values:
+            if str(cell) in missing_values:
                 cell = None
             if cell is not None:
                 cell = value_reader(cell)
diff --git a/tests/fields/test_integer.py b/tests/fields/test_integer.py
index ff2e50a6..e45b16bb 100644
--- a/tests/fields/test_integer.py
+++ b/tests/fields/test_integer.py
@@ -24,6 +24,10 @@ from frictionless import Field
         ("default", Decimal("1.0"), 1, {}),
         ("default", "1$", 1, {"bareNumber": False}),
         ("default", "ab1$", 1, {"bareNumber": False}),
+        ("default", "-12 €", -12, {"bareNumber": False}),
+        ("default", "-12€", -12, {"bareNumber": False}),
+        ("default", "€-12", -12, {"bareNumber": False}),
+        ("default", "€ -12", -12, {"bareNumber": False}),
         ("default", True, None, {}),
         ("default", False, None, {}),
         ("default", 3.14, None, {}),
diff --git a/tests/fields/test_number.py b/tests/fields/test_number.py
index 159f1a52..9b406609 100644
--- a/tests/fields/test_number.py
+++ b/tests/fields/test_number.py
@@ -26,6 +26,10 @@ from frictionless import Field, fields
         ("default", "01", 1, {}),
         ("default", " 01 ", 1, {}),
         ("default", "0.003", Decimal("0.003"), {}),
+        ("default", "-12.3 €", Decimal("-12.3"), {"bareNumber": False}),
+        ("default", "-12.3€", Decimal("-12.3"), {"bareNumber": False}),
+        ("default", "€-12.3", Decimal("-12.3"), {"bareNumber": False}),
+        ("default", "€ -12.3", Decimal("-12.3"), {"bareNumber": False}),
         ("default", "100%", Decimal(100), {"bareNumber": False}),
         ("default", "1000‰", Decimal(1000), {"bareNumber": False}),
         ("default", "-1000", Decimal(-1000), {}),
diff --git a/tests/schema/field/test_read.py b/tests/schema/field/test_read.py
index 713f5fbd..cf3a5dd5 100644
--- a/tests/schema/field/test_read.py
+++ b/tests/schema/field/test_read.py
@@ -37,9 +37,10 @@ def test_field_read_cell_number_missingValues():
         {
             "name": "name",
             "type": "number",
-            "missingValues": ["", "NA", "N/A"],
+            "missingValues": ["", "NA", "N/A", "0"],
         }
     )
     assert field.read_cell("") == (None, None)
     assert field.read_cell("NA") == (None, None)
     assert field.read_cell("N/A") == (None, None)
+    assert field.read_cell(0) == (None, None)