ProdutorAgro/react-native-masked-input-text

'?' option does not work for IP pattern.

Opened this issue · 0 comments

When I run the following test

	const inputProcessor = createInputProcessor('00?0?.00?0?.00?0?.00?0?');
	const inputValues = ['127.0.0.1'];
	const outputResults = enterValuesOneAtTime(inputValues, inputProcessor);

	expect(outputResults).toEqual([
		{
			text: '127.0.0.1',
			complete: false
		}
	]);

It fails with the following result:

    - Expected
    + Received

      Array [
        Object {
    -     "complete": false,
    -     "text": "127.0.0.1",
    +     "complete": false,
    +     "text": "127.001",
        },
      ]