validation - Sitecore Item Validators -


i created item validator validation rule template. i'm using check if 1 field date after field date following tutorial: https://sitecorejohn.wordpress.com/2010/03/17/validate-that-the-value-of-one-datetime-field-follows-another-with-sitecore. reason item pulled getitem() in validator not have change content editor has made until item saved. thought sitecore.data.validators.basevalidator.updateitem take care of seems control validate null. makes sense since item validator instead of field validator means if fires off on blur content editors may see false error messages or not see error messages when should. i'm running issue evaluate method firing twice on save; once before item saved getitem() returns non-updated values , once after save has expected values. if has insight why might happening i'd know. have feeling validator executing twice on save might config issue didn't see obvious in pipeline.

to new value of field that's being validated can use basevalidator's

getcontrolvalidationvalue(); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -