0


I have a question about (Clientside?) validation of datafields.

My model has a decimal property

public decimal CalculatedWork { get; set; }

If I try to insert a decimal value like 20,00 I get an error "Value has to be numeric". If I insert 20, everything is fine and when refreshing, 20,00 is shown.

How can I get this work? I tried This DataFormatString and this DecimalModelBinder but nothing works.

The DecimalModelBinder isn't even hit. What can I do or where is my fault?

2
  • you're using comma for the decimal point, correct? Commented Mar 24, 2020 at 15:19
  • Yes, that is right. Meanwhile I found something for client side validation. It overwrites the validation in javascript. Sorry, didn't find it again. Commented Mar 24, 2020 at 16:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.