validation_errors_list

Function validation_errors_list 

Source
pub fn validation_errors_list(errors: &ValidationErrors) -> String
Expand description

Render all validation errors as an unordered list

Useful for displaying all errors at the top of a form.

§Examples

use acton_htmx::template::helpers::validation_errors_list;
use validator::ValidationErrors;

let errors = ValidationErrors::new();
let html = validation_errors_list(&errors);

§Panics

Panics if the validation summary template cannot be rendered. Ensure templates are initialized via acton-htmx templates init before using this function.