<commit_before>@(form: Form[_])(implicit lang: Lang, request: Request[AnyContent], messages: play.api.i18n.Messages)

@import utils.helpers.CarersCrypto
@import play.api.i18n.Messages
@import utils.helpers.GAHelper._
@import app.ConfigProperties._

    @gaTrack(key: String, errorMessage: String)  = @{
        if(getProperty("include.analytics", default = true) ){
            trackEvent(request.path, "Error", Some(s"$key - $errorMessage"))
        }else{
            ""
        }
    }

    @if(form.hasErrors) {
    <div class="validation-summary">
            @for(error <- form.errors) {
                <p>@Html(messages(error.message, error.args: _*))</p>
            }
    </div><commit_msg>CADS-329 : Save for later resume page error handling. Show error key if its not blank as per field validation errors.<commit_after>@(form: Form[_])(implicit lang: Lang, request: Request[AnyContent], messages: play.api.i18n.Messages)

@import utils.helpers.CarersCrypto
@import play.api.i18n.Messages
@import utils.helpers.GAHelper._
@import app.ConfigProperties._

    @gaTrack(key: String, errorMessage: String)  = @{
        if(getProperty("include.analytics", default = true) ){
            trackEvent(request.path, "Error", Some(s"$key - $errorMessage"))
        }else{
            ""
        }
    }

    @if(form.hasErrors) {
    <div class="validation-summary">
            @for(error <- form.errors) {
                @error.key match {
                    case "" => {
                        <p>@Html(messages(error.message, error.args: _*))</p>
                    }
                    case _ => {
                        <p>@Html(messages(error.key, error.args: _*)) - @Html(messages(error.message, error.args: _*))</p>
                    }
                }
            }
    </div>
{'fraction_non_alphanumeric': 0.14802448525319978, 'fraction_numerical': 0.006121313299944352, 'mean_word_length': 2.1879432624113475, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6265344', 'n_tokens_mistral': 551, 'n_tokens_neox': 543, 'n_words': 101}