I am working on an Angular project where I need to create a custom directive for input fields that handle decimal numbers. The challenge I'm facing is ensuring compatibility with local decimal separators.
The directive should meet the following requirements:
- Accept decimal numbers with or without a leading zero, e.g., "0.123" or ".456".
- Automatically adjust to the user's local decimal separator (, or .).
- Restriction for negative numbers.
- Restrict non-numeric and non-decimal characters.
<input type="text" decimalNumbersOnly>