This is something I'd really like to see solved in client side frameworks like this.
It seems to me that you could do something similar to how ActiveRecord queries the database for a model's attributes - but instead expose a JSON service that returns a models attributes and validations. But perhaps JS doesn't have the dynamic / meta-programming capabilities to make this happen like Ruby does.
It seems to me that you could do something similar to how ActiveRecord queries the database for a model's attributes - but instead expose a JSON service that returns a models attributes and validations. But perhaps JS doesn't have the dynamic / meta-programming capabilities to make this happen like Ruby does.