QuranValidators class

Validation utilities for Quran data parameters.

Constructors

QuranValidators.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isArabicText(String text) bool
Validate Arabic text format (basic check for Arabic characters)
validateArabicText(String text, String paramName) → void
Validate that text contains Arabic characters
validateAyahId(int ayahId, int maxAyat) → void
Validate ayah ID within a surah
validateAyahRange(int startAyah, int endAyah, int maxAyat) → void
Validate ayah range
validateAyahStructure(Map<String, dynamic> ayah, int expectedId) → void
Validate individual ayah structure
validateDateRange(DateTime start, DateTime end) → void
Validate date range
validateEmail(String email) → void
Validate email format (for contact/feedback features)
validateFileExtension(String filePath, List<String> allowedExtensions) → void
Validate file extension
validateHizbNumber(int hizbNumber) → void
Validate Hizb number (1-60)
validateJuzNumber(int juzNumber) → void
Validate Juz number (1-30)
validateListNotEmpty<T>(List<T> list, String paramName) → void
Validate that a list is not empty
validateNonNegative(num number, String paramName) → void
Validate non-negative number
validateNotEmpty(String value, String paramName) → void
Validate that a string is not empty
validateNotNull(dynamic value, String paramName) → void
Validate that a value is not null
validateNumberOfAyahs(int numberOfAyahs) → void
Validate number of ayat for a surah
validatePagination(int page, int limit) → void
Validate pagination parameters
validatePercentage(double percentage) → void
Validate percentage value (0-100)
validatePositive(num number, String paramName) → void
Validate positive number
validateQuranDataStructure(Map<String, dynamic> data) → void
Validate JSON structure for Quran data
validateRange(num value, num min, num max, String paramName) → void
Validate that a number is within a specific range
validateRevelationOrder(int revelationOrder) → void
Validate revelation order (1-114)
validateRevelationType(String revelationType) → void
Validate revelation type
validateSearchTerm(String searchTerm) → void
Validate search term
validateSurahId(int surahId) → void
Validate surah ID (1-114)
validateSurahStructure(Map<String, dynamic> surah, int expectedId) → void
Validate individual surah structure
validateUrl(String url) → void
Validate URL format