Editor node.js - Validate.numeric() renders default error message when error
Editor node.js - Validate.numeric() renders default error message when error
I have a node.js application, the .numeric() field validator seems to work, but it won't send a custom error message, instead I'm getting the default error message "Input not valid". Other validators and their custom error message seem to work fine, like the .notEmpty():
new Field( 'data.product_id' )
.validator( Validate.notEmpty( new Validate.Options({ message: 'Invalid. Value must be set.' }) ) )
.validator( Validate.numeric( new Validate.Options({ message: 'Invalid. Value must be numeric.' }) ) )
If I provide for instance "dddd" in the field, I'm getting error message .numeric():
Input not valid
If I provide nothing "", I'm getting error message .notEmpty():
Invalid. Value must be set.
How can I provide a custom error message for .numeric()?
Editor: "datatables.net-editor-server": "^2.1.2",
Node: v22.20.0
This question has an accepted answers - jump to answer

Answers
The signature for the numeric validator is actually:
You need to use:
The decimal place is missing in the documentation on the site - that's my mistake, apologies. I'll correct that!
Allan
Great, thanks!