Improved validation error message texts and their DE translations

This commit is contained in:
PCoder 2017-08-01 00:01:19 +05:30
commit c1409d5ca1
2 changed files with 20 additions and 11 deletions

View file

@ -196,15 +196,15 @@ class IndexView(CreateView):
def validate_cores(self, value):
if (value > 48) or (value < 1):
raise ValidationError(_('Not a proper cores number'))
raise ValidationError(_('Invalid number of cores'))
def validate_memory(self, value):
if (value > 200) or (value < 2):
raise ValidationError(_('Not a proper ram number'))
raise ValidationError(_('Invalid RAM size'))
def validate_storage(self, value):
if (value > 2000) or (value < 10):
raise ValidationError(_('Not a proper storage number'))
raise ValidationError(_('Invalid storage size'))
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
def get(self, request, *args, **kwargs):