The base class for the object field ValueTypes.
The base class for the single field ValueTypes.
Provides JavaScript file which contains some functions for client side validation.
Provides JavaScript file which contains some functions for client side validation.
You can map this servlet to the path which you want as following:
class ScalatraBootstrap extends LifeCycle { override def init(context: ServletContext) { context.mount(new ValidationJavaScriptProvider, "/commons/js") ... } }
In this case, you can refer validation.js in HTML as following:
<link href="/common/js/validation.js" rel="stylesheet">
ValueType for the Boolean property.
ValueType for the java.util.Date property.
ValueType for the Double property.
ValueType for the dummy property.
ValueType wrapper to specified a property name which is used in the error message.
ValueType wrapper to specified a property name which is used in the error message.
val form = trim(mapping( "name" -> label("User name" , text(required)), "mail" -> label("Mail address", text(required)) ))
ValueType for the List property.
ValueType for the List property. Parameter name must be "name[index]" or "name[index][subName]".
ValueType for the Long property.
ValueType for the Int property.
ValueType wrapper for the optional mapping property.
ValueType wrapper for the optional property.
ValueType wrapper for the optional property which is available if checkbox is checked.
ValueType wrapper for the optional property which is required if condition is true.
ValueType wrapper for the optional property which is required if checkbox is checked.
ValueType for the String property.
Converts errors to JSON.
Converts errors to JSON.
ValueType wrapper to trim a parameter.
ValueType wrapper to trim a parameter.
val form = mapping( "name" -> trim(text(required)), "mail" -> trim(text(required)) )
Runs form validation before action.
Runs form validation before action. If there are validation error, action is not invoked and this method throws RuntimeException.
the mapping definition
the request parameters
the action
the result of action