Page MenuHomePhabricator

CdxField should support `warning` as status
Closed, DuplicatePublic


When validating a form dynamically you can set a status to a field if you want to indicate that the user needs to take action. E.g. when the input seems wrong or is incomplete.

We have a use case where there's a normalization step on a field that we want to communicate transparently. That's why we're using warning as status instead of error.

CdxField with validation warning.png (128×708 px, 19 KB)

This all works quite nicely on the frontend but it seems, that warning is not officially supported and tests for example give out a warning when you use it.

[Vue warn]: Invalid prop: custom validator check failed for prop "status". 
  at <CdxField status="warning" messages= { warning: 'Text' } > 
  at <FileTitle fileExtension="png" fileTitle="Foo" ref="VTU_COMPONENT" > 
  at <VTUROOT>

Event Timeline

CCiufo-WMF subscribed.

@WMDE-Fisch there are already designs for both warning and success statuses for the Field component and I've closed this as a duplicate of the existing task tracking it. It would be useful if you could comment on that task (T338802) with your specific use case. If you have the time, we'd welcome you to contribute this to Codex yourself given the designs are already available.