tommycli <tommy...@ucla.edu> writes:

> Are validation errors shown on CRUDify create/edit pages?
>
> I have validators set up like this:
>
>   object subdomain extends MappedString(this,64) {
>     override def validations = List(valUnique("Subdomain taken.")_,
>                                   
> valRegex(Pattern.compile("""^[A-Za-z0-9-]*$"""),
>                                            "Subdomains must only contain 
> letters, numbers, and
> hyphens."
>                                          )_) ::: super.validations
>     override def displayName = "Subdomain"
>     override def dbIndexed_? = true
>   }
>
> And on an invalid entry, the form will just silently fail - that is,
> when submitted, it will just give back the exact same form state - no
> error messages, no changes in the filled-out entries. This confuses me.

How should the messages be displayed? AFAIK, per field message display
is not supported atm. You can display all errors (incl field errors) by
including the 

<lift:Msgs showAll="true"/>

snippet. Note the showAll attribute which is now needed to show field
level errors.

/Jeppe

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to