anahitasocial/anahita — pull request #23 by kulbakin (2013-10-06 13:09:28+00:00)
Title: fix: empty values with validate-remote

fix validator so empty value sets RemoteValidator `status` to `success`
allowing other logic (namely onsubmit validation) to pick field
validation status properly

usecase:
form has 2 remote validators, field for 1st validator is left blank, field for 2nd validator has valid value; upon form submit, 2nd validator changes status to pending since it sends request asynchronously; when 2nd validator finishes, it checks if other remote validators registered for the form have success status.
before fix since check for empty value was performed outside validator, status could be null even if corresponding field considered valid which caused logic checking for success status of all remote validators return false;
after fix empty value updates validator status property thus resulting in proper recognizing of success status of all remote validators of the form.