vc-module-catalog
vc-module-catalog copied to clipboard
Create unique validator field
@Woland2k commented on Thu Jul 20 2017
In order to allow unique field type of validation, create a new fields in PropertyValue named "ShortTextUniqueValue" and "IntegerUniqueValue" (unique will only be available for short and integer value fields).
Then create the following type of constraints:
CREATE UNIQUE NONCLUSTERED INDEX idx_shorttextuniquevalue_notnull ON PropertyValue(ShortTextUniqueValue) WHERE ShortTextUniqueValue IS NOT NULL;
@OlegoO commented on Thu Aug 31 2017
- Display [Is Unique] checkbox [UI]
- Add new column ShortTextUniqueValue, IntegerUniqueValue into persistent model
- Add Database constrain into repository
- Update model mapping (Domain to Persistent, Persistent to Domain)
- Display validation error on save if error is occurred