{"record":{"id":"9951daea9927a496","repo":"Semantic-Org/Semantic-UI","slug":"progress-value-is-non-numeric","errorCode":null,"errorMessage":"Progress value is non numeric","messagePattern":"Progress value is non numeric","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/definitions/modules/progress.js","lineNumber":891,"sourceCode":"  percent        : false,\n  total          : false,\n  value          : false,\n\n  // delay in ms for fail safe animation callback\n  failSafeDelay : 100,\n\n  onLabelUpdate : function(state, text, value, total){\n    return text;\n  },\n  onChange      : function(percent, value, total){},\n  onSuccess     : function(total){},\n  onActive      : function(value, total){},\n  onError       : function(value, total){},\n  onWarning     : function(value, total){},\n\n  error    : {\n    method     : 'The method you called is not defined.',\n    nonNumeric : 'Progress value is non numeric',\n    tooHigh    : 'Value specified is above 100%',\n    tooLow     : 'Value specified is below 0%'\n  },\n\n  regExp: {\n    variable: /\\{\\$*[A-z0-9]+\\}/g\n  },\n\n  metadata: {\n    percent : 'percent',\n    total   : 'total',\n    value   : 'value'\n  },\n\n  selector : {\n    bar      : '> .bar',\n    label    : '> .label',\n    progress : '.bar > .progress'","sourceCodeStart":873,"sourceCodeEnd":909,"githubUrl":"https://github.com/Semantic-Org/Semantic-UI/blob/597843ab84d565cccfd8fd7719416350ae73e734/src/definitions/modules/progress.js#L873-L909","documentation":"update.progress() first coerces the value via get.numericValue() (progress.js:280-287), which strips non-digit/non-dot characters and returns false if nothing numeric remains. When it returns false, the module logs error.nonNumeric (progress.js:644-646) — the supplied value could not be interpreted as a number.","triggerScenarios":"Calling $('.progress').progress('update progress', 'abc') or .progress({ value: 'N/A' }) where the value has no numeric content; passing an object/array/undefined that numericValue cannot reduce to a number.","commonSituations":"Binding progress to a backend field that returns '-' or 'N/A' on loading; user-supplied values; parsing strings like 'completed' with no digits; null/undefined passed where a number is expected.","solutions":["Sanitize the value to a number before calling update progress (Number(x) || 0).","Guard with isFinite(Number(value)) before passing to .progress().","Handle non-numeric states (e.g. indeterminate) with a separate code path rather than feeding bad values."],"exampleFix":"// before\n$('.ui.progress').progress('update progress', raw); // raw === 'N/A' -> [96]\n\n// after\nvar n = Number(String(raw).replace(/[^0-9.]/g, ''));\nif (isFinite(n)) $('.ui.progress').progress('update progress', n);","handlingStrategy":"type-guard","validationCode":"var n = (typeof raw === 'string') ? Number(raw.replace(/[^0-9.\\-]/g,'')) : Number(raw);\nif (!isFinite(n)) throw new Error('Progress value is non-numeric: ' + raw);\n$('.ui.progress').progress('update progress', n);","typeGuard":"function isNumericValue(v){ var n = (typeof v === 'string') ? Number(v.replace(/[^0-9.\\-]/g,'')) : Number(v); return isFinite(n); }","tryCatchPattern":null,"preventionTips":["Coerce and validate values with Number()/isFinite before updating progress.","Handle loading/empty states separately instead of passing 'N/A' or '-'.","Sanitize backend-derived fields before binding."],"tags":["progress","numeric","validation","semantic-ui","console-error"],"backgroundTag":null,"analyzedSha":"597843ab84d565cccfd8fd7719416350ae73e734","analyzedAt":"2026-08-13T01:44:23.827Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}