Project

General

Profile

Actions

Task #839

closed

TextField - required and number attributes doesn't work together

Added by Ondřej Kopr about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Frontend
Target version:
Start date:
11/15/2017
Due date:
% Done:

100%

Estimated time:
Owner:

Description

After create required form definitions type of number, get this error:

[ERROR] { hidden: true, level: 'info' } [Error: Cannot merge type number with another type: string]
Error: Cannot merge type number with another type: string
    at Object.exports.assert (http://localhost:3000/dist/js/app.js:170548:11)
    at internals.Number.internals.Any.concat (http://localhost:3000/dist/js/app.js:181660:10)
    at TextField.getValidationDefinition (http://localhost:3000/dist/js/app.js:37573:46)
    at TextField.getValidationDefinition (http://localhost:3000/dist/js/app.js:46706:106)
    at TextField._resolveValidation (http://localhost:3000/dist/js/app.js:37547:40)
    at TextField.componentDidMount (http://localhost:3000/dist/js/app.js:37487:12)
    at http://localhost:3000/dist/js/app.js:236992:25
    at measureLifeCyclePerf (http://localhost:3000/dist/js/app.js:236802:12)
    at http://localhost:3000/dist/js/app.js:236991:11
    at CallbackQueue.notifyAll (http://localhost:3000/dist/js/app.js:233301:22)

main problem is in TextField getValidationDefinition and required with number.

Please Radek could you check this problem :(

Thank you :)

Please can you decided if this fix may be part of hotfix 7.5.3? It will be better if will.

Actions #2

Updated by Ondřej Kopr about 7 years ago

  • Description updated (diff)
Actions #3

Updated by Radek Tomiška about 7 years ago

  • Subject changed from EAV required number attributes doesn't work to TextField - required and number attributes doesn't work together
Actions #4

Updated by Radek Tomiška about 7 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Emerald (7.5.0)
  • % Done changed from 0 to 90

The issue was in TextField respectively in AbstractFormComponent component - i fixed appending validation for required number attribute.

Could you do a feedback pls?

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/eed8fb681b902a51508c67b7405b2d2d308dbcaa
Branch: hotfix/7.5.3, develop

Actions #5

Updated by Ondřej Kopr about 7 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

I did review, now can create eav form with required number (integer, long). Thank you for this awesome fix.

Actions #6

Updated by Radek Tomiška about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF