Skip to content

Commit

Permalink
fix(input): adiciona indicacao visual de campo invalido
Browse files Browse the repository at this point in the history
adiciona indicacao visual de campo invalido no `po-input`

 Fixes 7479
  • Loading branch information
anliben committed Oct 5, 2023
1 parent ab15f7c commit ab27f02
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,13 @@ describe('PoMask', () => {
expect(mask.valueToModel).toBe('1-1-1');
});

it('should return value "" to model and validMask return false', () => {
mask.formatModel = true;
mask.formatValue('', '9-9-9');
expect(mask.valueToModel).toBe('');
expect(mask.validMask()).toBe(false);
});

it('should test replaceMask function', () => {
expect(mask.replaceMask('0')).toEqual(/[0]/);
expect(mask.replaceMask('1')).toEqual(/[0-1]/);
Expand Down

0 comments on commit ab27f02

Please sign in to comment.