What is the best way to implement Change Password Functionality - Phoenix?

I am Using Guardian as Authentication Framework, I would like to know what is the best way to implement change password functionality in my Phoenix App, currently i am planing implement like follow

Created the ChangePassword Struct and Pass it to the Form , then Validate using Ecto Changeset and Update the User Password to The database

    defmodule ChangePassword  do
       defstruct [:oldPassword, :newPassword1, :newPassword2]
    end

Is it good approach??
suggest some good idea other than this???