I want to validate 1 params in model method, but i can't found any fit answers , please show me the right way.

```
class User < ActiveRecord::Base
    validate :username, presence: true, length: 4..5, unique: true
    validate :email, presence: true, unique: true, format: {with: /\A[a-z0-9\.]+@([a-z]{1,10}\.){1,2}[a-z]{2,4}\z/}
    def self.get_post(id)
        # how to call validate id ??? 
        validates :id, numericality: true
        if id.valid?
            # true code
        else
            # false code
        end
    end
    def change_profile
        # How to check validate user and email
        username.valid?
        email.valid?

        # some_code....

    end
end

```

Thanks all.