Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8707959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:59:43+00:00 2026-06-13T03:59:43+00:00

I have a problem with form , the problem is that I can’t show

  • 0

I have a problem with form , the problem is that I can’t show error in view properly(I think so). Validation works fine.

When the old password is incorrect error message is displayed below input box on the other hand when passwords are mismatched error isn’t appearing anywhere.

If I do some debug I get data:

from in view:
@pass_form("password").errors

I get this:

FormError(password,Passwords dont match,WrappedArray()) 

So my question how to fix form or code in view, to print that error properly.

Form(
    mapping(
        "old_password" -> text.verifying(Messages("forms.password.old.mismatch"),
        password => User.correct_?(user.id, password)),
       "password" -> tuple(
       "new" -> text(minLength = conf.getInt("password.length.min").get),
       "confirm" -> text).verifying(Messages("forms.password.new.mismatch"), 
          passwords => passwords._1 == passwords._2)
      )
    ((_, password) => password._1)((_) => Some(("", ("", ""))))
         )

In view I have:

@helper.form(action = routes.UserController.submitPassword) {

        @helper.input(pass_form("old_password")) { (id, name, value, args) =>
            <input type="password" name="@name" id="@id" @toHtmlArgs(args)>  
        }

        @helper.input(pass_form("password.new")) { (id, name, value, args) =>
            <input type="password" name="@name" id="@id" @toHtmlArgs(args)>  
        }

        @helper.input(pass_form("password.confirm")) { (id, name, value, args) =>
            <input type="password" name="@name" id="@id" @toHtmlArgs(args)>  
        }

        <input type="submit" value="Set">
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:59:44+00:00Added an answer on June 13, 2026 at 3:59 am

    first of all you might want to use the helper method for your password fields, since there is one for them. Have a look at views.html.helper.inputPassword and use it like so:

    @helper.inputPassword(field = pass_form("old_password"))
    

    The reason why the Passwords don’t match error is not displayed is, that it is an error bound to the form itself and not to a specific field. You will have to check the errors field of your form for that, which will give you a Seq[FormError]. You can then display these in an appropriate manner…

    Best regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web form that uses an Ajax date calendar. This works fine.
I have a following problem, I have HTML form that uploads a file with
I have a dropdown in my form that has a problem to populate when
i have bought a template that have built in contact form problem is that
I have a problem. The client is claiming that a prize signup form I
Fact: I'm not that good with jQuery. Problem: I have a form containing dynamically
The problem I am encountering is that for my login form I have to
I have an InfoPath form with several fields on, the problem is that one
I have a HTML form where I use several buttons. The problem is that
I have a form that can be dynamically duplicated (with JS) so that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.