does not have a corresponding accessor for data binding Play framework 2.5.3
<p>I want to save user data to database. <strong>play version 2.5.3</strong></p>

<p>I am getting this error:</p>

<blockquote>
  <p>JSR-303 validated property 'first_name' does not have a corresponding accessor for data binding - check your DataBinder's
  configuration (bean property versus direct field access)]</p>
</blockquote>

<p><strong>My model class</strong></p>

<pre><code>@Entity
public class UserRegisterModel extends Model
{
    @Id
    @GeneratedValue
    protected Long ID;

    @Constraints.Required
    protected String first_name;
    protected String last_name;
    protected String user_name;

    @Constraints.Required
    protected String password;
    protected String password_confirmation;

    @Constraints.Email
    @Column(unique = true)
    protected String email;
}
</code></pre>

<p><strong>Controller class</strong></p>

<pre><code>public Result submitUserRegistrationForm()
{
    play.data.Form&lt;UserRegisterModel&gt; form = play.data.Form.form(UserRegisterModel.class).bindFromRequest();
    UserRegisterModel register = form.bindFromRequest().get();
}
</code></pre>

<p>Also I want to match password and conform password. I should do this in Model or controller.</p>

<p>Could you please provide me some sample code(Model,Controller) with form validation?</p>