I have added an option for acoustic. Please check and let me know if there is anything wrong with this.
One suggestion I had was if we could maintain a list of properties and then instead of fetched and validating each and every field separately, we can loop over the properties and validate and fetch values using a generic method. So in case, if we want to add more properties like acoustic tomorrow, maybe we will have to change the properties file only.
properties.json may look like below:
{
prop: 'danceable',
title: 'danceable',
min: 0,
max: 10,
htmlId: 'danceable'
}
I have added an option for acoustic. Please check and let me know if there is anything wrong with this. One suggestion I had was if we could maintain a list of properties and then instead of fetched and validating each and every field separately, we can loop over the properties and validate and fetch values using a generic method. So in case, if we want to add more properties like acoustic tomorrow, maybe we will have to change the properties file only.
properties.json may look like below: { prop: 'danceable', title: 'danceable', min: 0, max: 10, htmlId: 'danceable' }