Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation function is_not_unique #2392

Merged
merged 9 commits into from
Nov 14, 2019
Prev Previous commit
Next Next commit
Add Filter is_not_unique
kennylajara authored Nov 14, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 36feb4405706559fca95183d80af94cad74db91b
2 changes: 2 additions & 0 deletions user_guide_src/source/libraries/validation.rst
Original file line number Diff line number Diff line change
@@ -670,6 +670,8 @@ in_list Yes Fails if field is not within a predetermined
integer No Fails if field contains anything other than an integer.
is_natural No Fails if field contains anything other than a natural number: 0, 1, 2, 3, etc.
is_natural_no_zero No Fails if field contains anything other than a natural number, except zero: 1, 2, 3, etc.
is_not_unique Yes Checks the database to see if the given value exist. Can ignore records by field/value to is_not_unique[table.field,where_field,where_value]
filter (currently accept only one filter).
is_unique Yes Checks if this field value exists in the database. Optionally set a is_unique[table.field,ignore_field,ignore_value]
column and value to ignore, useful when updating records to ignore itself.
less_than Yes Fails if field is greater than or equal to the parameter value or not numeric. less_than[8]