11/29/2023 0 Comments Ruby validation check string![]() ![]() Validates_with StrictValidator, strict: trueĮrrors.add(:base, 'A person cannot be a robot') if person_is_robot Validates_with OtherValidator, on: :create It clears the validators that are created with an invocation of validates_with and the callbacks that are set by an invocation of validate. ![]() Note that this will clear anything that is being used to validate the model for both the validates_with and validate methods. Clears all of the validators and validations.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |