DEV Community

hafizpustice05
hafizpustice05

Posted on

Uniqueness Validation with Example

Uniqueness Validation with Example
Now we will discuss rails uniqueness validation. Unique validation is most important for our specific work as we want to create or save student information so we need to identify every student. Student roll is one of the primary identities of every student so we want to save student information we will have to know that does roll already exists.
rails provide a unique validation helper.

We will define our unique rule in our student_info model.
Uniqueness Validation with Example

Top comments (0)