Keep error Path when wrapping error list #37

freizl opened this Issue Jun 6, 2012 · 2 comments


None yet

2 participants


dfChildErrorList only list all error message without each error Path.
I think it is better to keep the Path, for instance, put the Path as a attribute of li element.

By doing this is just to be more flexible regrading customize error highlights.
For instance, utilize JavaScript to highlight error over each element.

-- A quick fix at my local
dfChildErrorListRef view = return $ errorList (viewErrors view)
errorList :: [(Path, Text)] -> [X.Node]
errorList []    = []
errorList errs  = [X.Element "ul" [] $ map makeError errs]
                  where makeError (p:_, e) = X.Element "li" [("data-error", p)] [X.TextNode e]

Since HTML 5 allow add customize attribute started with data-, I name data-error here.



Okay, I'm not sure if many people need this but I can (and will) put it in anyway since it should never get in the way.


Great. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment