# Bug OP-18972 - User can input anything in WP unit costs

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-18972

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Costs and budgets, Frontend components and Primer design system, Modules and project features / Work packages |
| Target versions | 17.3.0 |
| Observed in versions |  |
| Sprint | 17.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | OP Dev Sirius Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Log in as a user with WP creation and add own unit costs permissions

2.  Go to any WP list

3.  Right click on any WP

4.  Select 'Log unit costs'

### What is the buggy behaviour?

  - User can save any type of input

### What is the expected behaviour?

From UX UI meeting group

1.  Pragmatic quick-fix: Change the field to a field with a regex on it to allow only number specific stuff.
    
    1.  This needed to be done with a regex because number fields are per definition not sensitive to locales resulting in wrong results with other locales then English

### 

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/919382/content">

### Environment information

**OpenProject version**

Core build

[eef7c5eccf63b767ec90e4cfac91aa5ce9ca2b62](https://qa.openproject-stage.com/external_redirect?url=https%3A%2F%2Fgithub.com%2Fopf%2Fopenproject%2Fcommits%2Feef7c5eccf63b767ec90e4cfac91aa5ce9ca2b62)

Product version

[ecfbdd2facf738f725a89cda20e6909aaa4b155f](https://qa.openproject-stage.com/external_redirect?url=https%3A%2F%2Fgithub.com%2Fopf%2Fsaas-openproject%2Fcommits%2Fecfbdd2facf738f725a89cda20e6909aaa4b155f)

Core version

OpenProject 17.2.0

**Browser**

- [ ] Chrome
- [x] Firefox
- [ ] Safari
- [ ] Mobile Safari
- [ ] Other (please specify)

**Operating System**

- [x] Windows
- [ ] Mac OS X
- [ ] Mobile iOS
- [ ] Mobile Android
- [ ] Linux (please specify distro)
- [ ] Chrome OS
- [ ] Other (please specify)
