All Downloads are FREE. Search and download functionalities are using the official Maven repository.

core.utils.getValidationClass.ts Maven / Gradle / Ivy

import { ValidationResult } from '../validation/types'

export function getValidationClass(message?: ValidationResult): string | false {
    if (!message) {
        return false
    }

    if (message.severity === 'success') {
        return 'is-valid'
    }

    if (message.severity === 'warning') {
        return 'has-warning'
    }

    return 'is-invalid'
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy