through validates active record code example
Example 1: active record validates
class Person < ApplicationRecord
validates :name, :login, :email, presence: true
end
Example 2: active record validates
class Person < ApplicationRecord
validates :name, presence: true
end