Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Validation 插入时显示类型转换错误_Validation_Spring Mvc - Fatal编程技术网

Validation 插入时显示类型转换错误

Validation 插入时显示类型转换错误,validation,spring-mvc,Validation,Spring Mvc,我正在调用Insert中的validator方法来检查空文本框…并打印消息 它打印消息,但显示此消息,即 Failed to convert property value of type java.lang.String to required type float for property advance; nested exception is java.lang.NumberFormatException: empty String 我正在验证的文本框字段是浮点型 有人能告诉我如何消除这

我正在调用Insert中的validator方法来检查空文本框…并打印消息

它打印消息,但显示此消息,即

Failed to convert property value of type java.lang.String to required type float for property advance; nested exception is java.lang.NumberFormatException: empty String
我正在验证的文本框字段是浮点型

有人能告诉我如何消除这个错误吗

这是表单标签

[form:input path="advance" id="addpa"]               
…世纪 类名是order 私人浮动预付款;
getter和setter方法

消息嵌套异常为java.lang.NumberFormatException:empty String表示您的属性advance为空,您可以显示您的表单吗?是的,它在表单中为空。如何处理…我的意思是显示您的html标记和表单objecct..我已对其进行检查您有path=“adds”但您的错误消息显示property advance,因此请尝试更改advance中的adds,